Hi, > I am curious how it would be possible to setup the necessary aspects for a > unit test of this method? How do you setup an entire exchange in a unit > test, or is there capabilities built in somewhere I am unaware of?
You can set up exchange fixtures with the appropriate ProducerTemplate methods. For example: producerTemplate.sendBodyAndHeader("direct:test", "testMessage", "headerKey", "headerValue"); I would also suggest you to split your processor into smaller units of processing. You could for example try to call Camel components (like JDBC) via routes instead of fetching them and calling explicitly in the processor. You might also consider extracting getUpdateProcessStatus() method into dedicated bean and wiring it into your route via bean component [1]. To more fine-grained is you processing flow, the easier will it be to test it. Cheers. [1] http://camel.apache.org/bean.html -- Henryk Konsek http://henryk-konsek.blogspot.com