/**
* Basic dispatcher test which verifies erroneous response from service.
*/
@Test
public void testFaultFault() {
ErrorInterceptor beforeFault = new ErrorInterceptor(false, ExchangeInterceptor.PROVIDER);
ErrorInterceptor afterFault = new ErrorInterceptor(true, ExchangeInterceptor.PROVIDER);
_camelContext.getWritebleRegistry().put("beforeFault", beforeFault);
_camelContext.getWritebleRegistry().put("afterFault", afterFault);
ServiceReference ref = registerInOutService("inOut");
Exchange exchange = sendMessage(ref, TEST_CONTENT);
assertNoCause("Error before on target Provider", exchange);
Assert.assertEquals(2, beforeFault.getCount());
Assert.assertEquals(2, afterFault.getCount());
}