### Question:
PropertyFacetProvider implements FacetProvider { @Override public List<Facet> getFacets(Class<?> pojoClass) { return facetsOf(pojoClass); }  @Override List<Facet> getFacets(Class<?> pojoClass);  }### Answer:
@Test public void testGetFacets() throws Exception { FacetProvider provider = new PropertyFacetProvider(); Map<String, Facet> facets = provider.getFacetsAsMap(PropertiesPojo.class); assertNotNull(facets); assertEquals(5, facets.size()); assertTrue(facets.containsKey("baz")); assertTrue(facets.containsKey("writeOnly")); assertTrue(facets.containsKey("readOnly")); assertTrue(facets.containsKey("writeOnlyBoolean")); assertTrue(facets.containsKey("readOnlyBoolean")); assertFalse(facets.containsKey("ignoredProperty")); }
@Test public void testGetType() { FacetProvider provider = new PropertyFacetProvider(); List<Facet> facets = provider.getFacets(PropertiesPojo.class); Facet facet = facets.get(0); assertEquals(String.class, facet.getType().getRawType()); }
@Test public void testValueHandling() { FacetProvider provider = new PropertyFacetProvider(); List<Facet> facets = provider.getFacets(PropertiesPojo.class); PropertiesPojo pojo = new PropertiesPojo(); Facet facet = facets.get(0); assertNull(facet.getValue(pojo)); facet.setValue(pojo, "testValue"); assertEquals("testValue", facet.getValue(pojo)); }