TilesContextELResolver extends ELResolver { @Override public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) { if (base != null) { return null; } return requestBeanInfo.getDescriptors().iterator(); } TilesContextELResolver(ELResolver beanElResolver); @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 testGetFeatureDescriptorsELContextObject() { replay(beanElResolver); assertNull(resolver.getFeatureDescriptors(null, new Integer(1))); Map<String, PropertyDescriptor> expected = new LinkedHashMap<String, PropertyDescriptor>(); ClassUtil.collectBeanInfo(Request.class, expected); ClassUtil.collectBeanInfo(ApplicationContext.class, expected); Iterator<FeatureDescriptor> featureIt = resolver.getFeatureDescriptors( null, null); Iterator<? extends FeatureDescriptor> expectedIt = expected.values().iterator(); while (featureIt.hasNext() && expectedIt.hasNext()) { assertEquals("The feature is not the same", expectedIt.next(), featureIt.next()); } assertTrue("The feature descriptors are not of the same size", !featureIt.hasNext() && !expectedIt.hasNext()); verify(beanElResolver); }