@Test
public void testGetServletContextHashModel() throws TemplateModelException {

    GenericServlet servlet = createMock(GenericServlet.class);
    ServletContext servletContext = createMock(ServletContext.class);
    ObjectWrapper objectWrapper = createMock(ObjectWrapper.class);
    expect(servlet.getServletContext()).andReturn(servletContext);
    replay(servlet, objectWrapper);
    ServletContextHashModel servletContextModel = new ServletContextHashModel(servlet, objectWrapper);
    expect(model.get("Application")).andReturn(servletContextModel);
    replay(template, model, servletContext);
    env = new Environment(template, model, writer);
    locale = Locale.ITALY;
    env.setLocale(locale);
    assertEquals(servletContextModel, FreemarkerRequestUtil.getServletContextHashModel(env));
    verify(template, model, servlet, servletContext, objectWrapper);
}