Map<String, Object> sessionScope = new HashMap<String, Object>();
Map<String, Object> applicationScope = new HashMap<String, Object>();
requestScope.put("object1", "value");
sessionScope.put("object2", new Integer(1));
applicationScope.put("object3", new Float(2.0));
Request request = createMock(Request.class);
expect(request.getContext("request")).andReturn(requestScope)
.anyTimes();
expect(request.getContext("session")).andReturn(sessionScope)
.anyTimes();
ApplicationContext applicationContext = createMock(ApplicationContext.class);
expect(request.getContext("application")).andReturn(
applicationScope).anyTimes();
expect(request.getAvailableScopes()).andReturn(
Arrays.asList(new String[] { "request", "session", "application" }))
.anyTimes();
replay(request, applicationContext);
ELContext context = new ELContextImpl(resolver);