AbstractViewRequest extends DispatchRequestWrapper { @Override public void include(String path) throws IOException { setForceInclude(true); doInclude(path); } AbstractViewRequest(DispatchRequest request); @Override void dispatch(String path); @Override void include(String path);  }
@Test public void testInclude() throws IOException { Map<String, Object> requestScope = new HashMap<String, Object>(); expect(request.getContext(Request.REQUEST_SCOPE)).andReturn(requestScope); wrappedRequest.include("/my/path.html"); replay(wrappedRequest, request, applicationContext); request.include("/my/path.html"); assertTrue((Boolean) requestScope.get(AbstractRequest.FORCE_INCLUDE_ATTRIBUTE_NAME)); verify(wrappedRequest, request, applicationContext); }