List<DelegatingSmartEndpointInterceptor> interceptors = new ArrayList<DelegatingSmartEndpointInterceptor>(
applicationContext.getBeansOfType(DelegatingSmartEndpointInterceptor.class).values());
assertEquals("not enough smart interceptors found", 6, interceptors.size());
for (int i = 0; i < interceptors.size(); i++) {
DelegatingSmartEndpointInterceptor delegatingInterceptor = interceptors.get(i);
MyInterceptor interceptor = (MyInterceptor) delegatingInterceptor.getDelegate();
assertEquals("Invalid ordering found for [" + delegatingInterceptor + "]", i, interceptor.getOrder());
}
}