### Question:
ExtendedAttributePropertyAccessor implements PropertyAccessor { @Override public boolean canRead(EvaluationContext context, Object target, String name) throws AccessException { if (target instanceof BaseObjectWithExts && name != null) { for (PropertyAccessor accessor : context.getPropertyAccessors()) { if (accessor instanceof ReflectivePropertyAccessor) { return !accessor.canRead(context, target, name); } } } return false; }  @Override Class<?>[] getSpecificTargetClasses(); @Override boolean canRead(EvaluationContext context, Object target, String name); @Override TypedValue read(EvaluationContext context, Object target, String name); @Override boolean canWrite(EvaluationContext context, Object target, String name); @Override void write(EvaluationContext context, Object target, String name, Object newValue);  }### Answer:
@Test public void testCanReadNullName() throws AccessException { boolean canRead = accessor.canRead(evalContext, objWithExt, null); Assert.assertFalse(canRead); }
@Test public void testCanReadNullTarget() throws AccessException { boolean canRead = accessor.canRead(evalContext, null, null); Assert.assertFalse(canRead); }
@Test public void testCanReadNonExt() throws AccessException { boolean canRead = accessor.canRead(evalContext, obj, "name"); Assert.assertFalse(canRead); }
@Test public void testCanReadNonExtNullName() throws AccessException { boolean canRead = accessor.canRead(evalContext, obj, null); Assert.assertFalse(canRead); }
@Test public void testCanReadExtCoreName() throws AccessException { boolean canRead = accessor.canRead(evalContext, objWithExt, "code"); Assert.assertFalse(canRead); }
@Test public void testCanReadExtName() throws AccessException { boolean canRead = accessor.canRead(evalContext, objWithExt, "someExtAttribute"); Assert.assertTrue(canRead); }