ResourceHandlerMapping extends RequestMappingHandlerMapping { @Override protected HandlerMethod lookupHandlerMethod(String lookupPath, HttpServletRequest request) throws Exception { if (lookupPath.startsWith(serviceRootPathWithSlash)) { doHandleMatch(doCreateRequestMappingInfo(), lookupPath, request); return new HandlerMethod(handler, handlerMethod); } return super.lookupHandlerMethod(lookupPath, request); } ResourceHandlerMapping(String serviceRootPath, Class<? extends Annotation> handlerMethodAnnotation,
			Object handler);   }
@Test public void testLookupHandlerMethod() throws Exception { final String lookupPath = "/service-root/a/b/c"; Method expectedMethod = resourceController.getClass().getMethod("handle", WebRequest.class, RequestMessageContainer.class); HandlerMethod expected = new HandlerMethod(resourceController, expectedMethod); new NonStrictExpectations() { { } }; HandlerMethod actual = target.lookupHandlerMethod(lookupPath, request); assertThat(actual, is(equalTo(expected))); }