@Test(expected = NotAvailableFreemarkerServletException.class)
public void testGetRequestHashModelException() throws TemplateModelException {

    HttpServletRequest request = createMock(HttpServletRequest.class);
    ObjectWrapper objectWrapper = createMock(ObjectWrapper.class);
    expect(model.get("Request")).andThrow(new TemplateModelException());
    replay(template, model, request, objectWrapper);
    try {
        env = new Environment(template, model, writer);
        locale = Locale.ITALY;
        env.setLocale(locale);
        FreemarkerRequestUtil.getRequestHashModel(env);
    } finally {
        verify(template, model, request, objectWrapper);
    }
}