String path = "this way";
DispatchRequest enclosedRequest = createMock(DispatchRequest.class);
ApplicationContext applicationContext = createMock(ApplicationContext.class);
Map<String, Object> requestScope = new HashMap<String, Object>();
enclosedRequest.include(path);
expect(enclosedRequest.getAvailableScopes()).andReturn(Collections.singletonList("parent"));
expect(enclosedRequest.getContext(Request.REQUEST_SCOPE)).andReturn(requestScope);
replay(enclosedRequest, applicationContext);
context = new FreemarkerRequest(enclosedRequest, env);
context.dispatch(path);