public void testExecuteSession() {
HttpServletRequest request = createMock(HttpServletRequest.class);
HttpServletResponse response = createMock(HttpServletResponse.class);
HttpSession session = createMock(HttpSession.class);
ServletContext servletContext = createMock(ServletContext.class);
InternalContextAdapter velocityContext = createMock(InternalContextAdapter.class);
ViewToolContext viewContext = createMock(ViewToolContext.class);
ASTMap astMap = createMock(ASTMap.class);
Node node = createMock(Node.class);
TilesContainer container = createMock(TilesContainer.class);
Writer writer = new StringWriter();
Map<String, Object> params = createParams();
params.put("scope", "session");
Map<String, Object> attributes = new HashMap<String, Object>();
attributes.put("one", "value1");
attributes.put("two", "value2");
expect(velocityContext.getInternalUserContext()).andReturn(viewContext);
expect(viewContext.getRequest()).andReturn(request);
expect(viewContext.getResponse()).andReturn(response);
expect(viewContext.getServletContext()).andReturn(servletContext);
expect(node.jjtGetChild(0)).andReturn(astMap);
expect(astMap.value(velocityContext)).andReturn(params);