MockEndpoint mockCompleted = getMockEndpoint("mock:out");
mockCompleted.setExpectedMessageCount(0);
MockEndpoint mockWs = getMockEndpoint("mock:ws");
mockWs.whenAnyExchangeReceived(new ExceptionThrowingProcessor("ws is down"));
try {
template.sendBodyAndHeader("direct:transacted", message, "messageId", "foo");
fail();
} catch (CamelExecutionException cee) {