### Question:
TilesContextELResolver extends ELResolver { @Override public boolean isReadOnly(ELContext context, Object base, Object property) { if (context == null) { throw new NullPointerException(); } return true; } 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);  }### Answer:
@Test public void testIsReadOnly() { replay(beanElResolver); ELContext context = new ELContextImpl(resolver); assertTrue("The value is not read only", resolver.isReadOnly(context, null, null)); verify(beanElResolver); }
@Test(expected = NullPointerException.class) public void testIsReadOnlyNPE() { replay(beanElResolver); try { resolver.isReadOnly(null, null, null); } finally { verify(beanElResolver); } }