MockEndpoint mockWs = getMockEndpoint("mock:ws");
// the web service should be invoked once only
mockWs.setExpectedMessageCount(1);
MockEndpoint mockOut = getMockEndpoint("mock:out");
mockOut.whenExchangeReceived(1, new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
throw new IllegalStateException("Out system is down");
}
});