ServletContextHashModel servletContextModel = new ServletContextHashModel(servlet, objectWrapper);
expect(model.get(FreemarkerServlet.KEY_REQUEST)).andReturn(requestModel).times(CALL_COUNT);
expect(model.get(FreemarkerServlet.KEY_APPLICATION)).andReturn(servletContextModel).times(2);
initEnvironment();
TemplateDirectiveBody body = createMock(TemplateDirectiveBody.class);
Map<String, Object> params = new HashMap<String, Object>();
Attribute attribute = createMock(Attribute.class);
params.put("template", objectWrapper.wrap("myTemplate"));
params.put("templateType", objectWrapper.wrap("myTemplateType"));
params.put("templateExpression", objectWrapper.wrap("myTemplateExpression"));
params.put("role", objectWrapper.wrap("myRole"));
params.put("preparer", objectWrapper.wrap("myPreparer"));
tModel.start(container, env);
tModel.end(container, "myTemplate", "myTemplateType",
"myTemplateExpression", "myRole",
"myPreparer", env);
body.render(isA(NullWriter.class));
replay(tModel, body, container, attribute);
fmModel.execute(env, params, null, body);
verify(template, model, request, tModel, body, container, servlet, servletContext, attribute);
}