@Test
public void testGetAsObjectDefault() throws TemplateModelException {

    Template template = createMock(Template.class);
    TemplateHashModel rootDataModel = createMock(TemplateHashModel.class);
    Writer out = createMock(Writer.class);
    expect(template.getMacros()).andReturn(new HashMap<String, Macro>());
    replay(template, rootDataModel, out);
    new Environment(template, rootDataModel, out);
    assertEquals(new Integer(1), FreemarkerUtil.getAsObject(null, Integer.class, new Integer(1)));
    verify(template, rootDataModel, out);
}