### Question:
SubFacet implements Facet { @Override public Object getValue(Object pojo) { Object parentValue = parentValue(pojo); return parentValue == null ? null : child.getValue(parentValue); } SubFacet(Facet parent, Facet child, boolean autoCreateParent); @Override Facet flatten(); @Override A getAnnotation(Class<A> annotationType); @Override String getName(); @Override GenericType getType(); @Override Object getValue(Object pojo); @Override boolean hasAnnotation(Class<A> annotationType); @Override void setValue(Object pojo, Object value); @Override List<Facet> subFacets(boolean autoCreateParent); static final String SEPARATOR; }### Answer:
@Test public void testLenientGetValue() { Parent parent = new Parent(); assertNull(lenientFacet.getValue(parent)); parent.child = new Child(); assertNull(lenientFacet.getValue(parent)); parent.child.property = "test_value"; assertEquals("test_value", lenientFacet.getValue(parent)); }
@Test public void testStrictGetValue() { Parent parent = new Parent(); assertNull(strictFacet.getValue(parent)); parent.child = new Child(); assertNull(strictFacet.getValue(parent)); }