Map<String, TemplateModel> params = createMock(Map.class);
Template template = createMock(Template.class);
TemplateHashModel rootDataModel = createMock(TemplateHashModel.class);
Writer out = createMock(Writer.class);
TemplateDirectiveBody body = createMock(TemplateDirectiveBody.class);
GenericServlet servlet = createMock(GenericServlet.class);
ObjectWrapper wrapper = createMock(ObjectWrapper.class);
ServletContext servletContext = createMock(ServletContext.class);
ApplicationContext applicationContext = createMock(ApplicationContext.class);
HttpServletRequest httpServletRequest = createMock(HttpServletRequest.class);
HttpServletResponse httpServletResponse = createMock(HttpServletResponse.class);
expect(template.getMacros()).andReturn(new HashMap<String, Macro>());
expect(servlet.getServletContext()).andReturn(servletContext)
.anyTimes();
expect(
servletContext
.getAttribute(ApplicationAccess.APPLICATION_CONTEXT_ATTRIBUTE))
.andReturn(applicationContext);