@SuppressWarnings({ "unchecked", "rawtypes" })

@Test
public void testGetType() {
    ELContext elContext = createMock(ELContext.class);
    Request request = createMock(Request.class);
    ApplicationContext applicationContext = createMock(ApplicationContext.class);
    expect(elContext.getContext(Request.class)).andReturn(request);
    expect(elContext.getContext(ApplicationContext.class)).andReturn(applicationContext);
    expect(beanElResolver.getType(elContext, request, "responseCommitted")).andReturn((Class) Boolean.class);
    expect(beanElResolver.getType(elContext, applicationContext, "initParams")).andReturn((Class) Map.class);
    elContext.setPropertyResolved(true);
    expectLastCall().times(2);
    replay(beanElResolver, elContext, request, applicationContext);
    assertNull(resolver.getType(elContext, new Integer(1), "whatever"));
    assertEquals(Boolean.class, resolver.getType(elContext, null, "responseCommitted"));
    assertEquals(Map.class, resolver.getType(elContext, null, "initParams"));
    verify(beanElResolver, elContext, request, applicationContext);
}