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