public void smartEndpointInterceptors() throws Exception {
StaticApplicationContext applicationContext = new StaticApplicationContext();
applicationContext.registerSingleton("smartInterceptor", MySmartEndpointInterceptor.class);
final Object endpoint = new Object();
EndpointInterceptor interceptor = new EndpointInterceptorAdapter();
AbstractEndpointMapping mapping = new AbstractEndpointMapping() {
@Override
protected Object getEndpointInternal(MessageContext givenRequest) throws Exception {
assertEquals("Invalid request passed", messageContext, givenRequest);
return endpoint;