Here is my sample route. It is working fine with camel:run. I am able to read
from the DB. 


from("oracleJpa://com.model.EventQueue?consumeDelete=false&consumer.delay=25000")
                .id("OracleListener")
                .to("log:{body}")
                .to("mock:JPAMock");

For testing the route, I have setup an inmemory Derby Database and am trying
to assert on the mock.

                EventQueue event = new EventQueue();
                event.setEventLastChangeUser("yenuganti");
                event.setEventMessage("TestMessage");
                
                List<EventQueue> expectedBodies = new ArrayList<EventQueue>();
                expectedBodies.add(event);
                
                mock.setExpectedMessageCount(1);
                mock.expectedBodiesReceived(expectedBodies);
                mock.setResultWaitTime(15000);
                mock.assertIsSatisfied();

It is failing on the assertion 

*java.lang.AssertionError: mock://JMSMock Received message count. Expected:
<1> but was: <0>*

There is one record in my derby DB. But why is my JPA endpoint not able to
read it ?

Please help. 




--
View this message in context: 
http://camel.465427.n5.nabble.com/JPA-Endpoint-Testing-with-Derby-in-memory-DB-tp5728253.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to