assertEquals(3, chain.getInterceptors().length);
assertEquals(LocaleChangeInterceptor.class, chain.getInterceptors()[0].getClass());
assertEquals(ConversionServiceExposingInterceptor.class, chain.getInterceptors()[1].getClass());
assertEquals(ResourceUrlProviderExposingInterceptor.class, chain.getInterceptors()[2].getClass());
AbstractHandlerMapping handlerMapping = (AbstractHandlerMapping) this.config.viewControllerHandlerMapping();
handlerMapping.setApplicationContext(this.context);
assertNotNull(handlerMapping);
assertEquals(1, handlerMapping.getOrder());
assertEquals(TestPathHelper.class, handlerMapping.getUrlPathHelper().getClass());
assertEquals(TestPathMatcher.class, handlerMapping.getPathMatcher().getClass());
chain = handlerMapping.getHandler(new MockHttpServletRequest("GET", "/path"));
assertNotNull(chain.getHandler());
chain = handlerMapping.getHandler(new MockHttpServletRequest("GET", "/bad"));
assertNotNull(chain.getHandler());
chain = handlerMapping.getHandler(new MockHttpServletRequest("GET", "/old"));
assertNotNull(chain.getHandler());
handlerMapping = (AbstractHandlerMapping) this.config.resourceHandlerMapping();
handlerMapping.setApplicationContext(this.context);
assertNotNull(handlerMapping);
assertEquals(Integer.MAX_VALUE - 1, handlerMapping.getOrder());
assertEquals(TestPathHelper.class, handlerMapping.getUrlPathHelper().getClass());
assertEquals(TestPathMatcher.class, handlerMapping.getPathMatcher().getClass());
chain = handlerMapping.getHandler(new MockHttpServletRequest("GET", "/resources/foo.gif"));
assertNotNull(chain.getHandler());
assertEquals(Arrays.toString(chain.getInterceptors()), 2, chain.getInterceptors().length);
// PathExposingHandlerInterceptor at chain.getInterceptors()[0]
assertEquals(ResourceUrlProviderExposingInterceptor.class, chain.getInterceptors()[1].getClass());
handlerMapping = (AbstractHandlerMapping) this.config.defaultServletHandlerMapping();
handlerMapping.setApplicationContext(this.context);
assertNotNull(handlerMapping);
assertEquals(Integer.MAX_VALUE, handlerMapping.getOrder());
chain = handlerMapping.getHandler(new MockHttpServletRequest("GET", "/anyPath"));
assertNotNull(chain.getHandler());
}