Greetings, I have a question around unit testing within Camel as I am fairly new to it. I have a process:
public void setProcessStatus(Exchange exchange) throws Exception { String processName = exchange.getIn().getHeader("process_name", String.class); String processStatus = exchange.getIn().getHeader("process_status", String.class); JdbcEndpoint e = (JdbcEndpoint) exchange.getContext().getEndpoint("jdbc:mtgsServiceDataSource"); JdbcProducer p = (JdbcProducer) e.createProducer(); exchange.getIn().setBody(getUpdateProcessStatus(processName,processStatus)); p.process(exchange); int result = (Integer) exchange.getOut().getHeader("CamelJdbcUpdateCount", Integer.class); if(result <= 0) throw new InvalidProcessStateException("Process Status unable to be updated"); } 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? Thanks for any help -- View this message in context: http://camel.465427.n5.nabble.com/Unit-Testing-Question-tp5745966.html Sent from the Camel - Users mailing list archive at Nabble.com.