ScopeELResolver extends ELResolver { @Override public Class<?> getType(ELContext context, Object base, Object property) { if (base != null || property == null || !(property instanceof String) || !((String) property).endsWith("Scope")) { return null; } return Map.class; }  @Override Class<?> getCommonPropertyType(ELContext context, Object base); @Override Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context,
            Object base); @Override Class<?> getType(ELContext context, Object base, Object property); @Override Object getValue(ELContext context, Object base, Object property); @Override boolean isReadOnly(ELContext context, Object base, Object property); @Override void setValue(ELContext context, Object base, Object property,
            Object value);  }
@Test public void testGetType() { Request request = createMock(Request.class); ApplicationContext applicationContext = createMock(ApplicationContext.class); ELContext context = new ELContextImpl(resolver); replay(request, applicationContext); context.putContext(Request.class, request); context.putContext(ApplicationContext.class, applicationContext); assertNull(resolver.getType(context, new Integer(1), "whatever")); assertEquals("The requestScope object is not a map.", Map.class, resolver.getType(context, null, "requestScope")); assertEquals("The sessionScope object is not a map.", Map.class, resolver.getType(context, null, "sessionScope")); assertEquals("The applicationScope object is not a map.", Map.class, resolver.getType(context, null, "applicationScope")); }