Check the unit tests of camel-jpa source code for examples.
Many thanks for the swift reply. This all works fine.
I am experiencing a situation , however, whereby, the code runs through fine the @Consumed methods are called, which update the entity. This actually persists when I look at the results in the DB at the end of the execution flow.
However, when I run the same code effectively, through my test code, using mvn test, to run, the test results are all asserted positively, and the test passes, showing that the updates that the @COnsumed method was supposed to make, did indeed take place. So all good! However, when I look in the DB afterwards, I find that these fields in teh table were'nt actually updated!
I am extending the 'org.apache.camel.ContextTestSupport' class as part of my test. Is there any concept of this test class automatically rolling back any changes that were made. I remember ome Spring Test classes having this functionality for Unit Testing, thus meaning that one doesn't have to 'clean up' the database afterwards.
Sorry, I realise I haven't described in much detail here, but I just wonder if any form of automatic rollback is done in any of the Test classes, similar to the Spring Test class I was talking about..
Or any other ideas on what may be going on here?