@Test
public void testGetValue() {

    Map<String, Object> requestScope = new HashMap<String, Object>();
    requestScope.put("objectKey", "objectValue");
    Map<String, Object> sessionScope = new HashMap<String, Object>();
    sessionScope.put("sessionObjectKey", "sessionObjectValue");
    Map<String, Object> applicationScope = new HashMap<String, Object>();
    applicationScope.put("applicationObjectKey", "applicationObjectValue");
    Request request = createMock(Request.class);
    expect(request.getContext("request")).andReturn(requestScope);
    expect(request.getContext("session")).andReturn(sessionScope);
    ApplicationContext applicationContext = createMock(ApplicationContext.class);
    expect(request.getContext("application")).andReturn(applicationScope);
    ELContext context = new ELContextImpl(resolver);
    replay(request, applicationContext);
    context.putContext(Request.class, request);
    context.putContext(ApplicationContext.class, applicationContext);
    assertNull(resolver.getValue(context, new Integer(1), "whatever"));
    assertEquals("The requestScope map does not correspond", requestScope,
            resolver.getValue(context, null, "requestScope"));
    assertEquals("The sessionScope map does not correspond", sessionScope,
            resolver.getValue(context, null, "sessionScope"));
    assertEquals("The applicationScope map does not correspond",
            applicationScope, resolver.getValue(context, null,
                    "applicationScope"));
}