endpoint = createTestInboundEndpoint(null, new TestSecurityFilter(false), null,
new ResponseAppendTransformer(), MessageExchangePattern.REQUEST_RESPONSE, null);
endpoint.setListener(inboundListener);
requestEvent = createTestRequestEvent(endpoint);
responseEvent = createTestResponseEvent(endpoint);
responseEvent.getMessage().setExceptionPayload(new DefaultExceptionPayload(new RuntimeException()));
MessageProcessor mpChain = ((AbstractEndpoint) endpoint).getMessageProcessorChain(requestEvent.getFlowConstruct());
// Required for UnauthorisedException creation
RequestContext.setEvent(requestEvent);