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