// GIVEN a request with the INCLUDE attribute set
HttpServletRequest request = mock(HttpServletRequest.class);
when(request.getAttribute("javax.servlet.include.request_uri")).thenReturn("/some/url");
// WHEN the provider is asked for the DispatcherType
DispatcherTypeProvider provider = new Servlet25DispatcherTypeProvider();
DispatcherType dispatcherType = provider.getDispatcherType(request, mock(ServletContext.class));
// THEN it should return INCLUDE
assertEquals(DispatcherType.INCLUDE, dispatcherType);
}