### Question:
BackendPropertyValueExtractor extends AbstractPropertyValueExtractor { @Override protected Object readValue(Object model, String propertyName) { try { if (PropertyUtils.getPropertyDescriptor(model, propertyName) != null) { return PropertyUtils.getProperty(model, propertyName); } } catch (Exception e) { logger.warn("Error getting property '{}' from object '{}'", propertyName, model); logger.warn("Caused by:", e); } return null; }    }### Answer:
@Test public void testWithMyTestBean() { bean.setStringProperty(STRING_PROPERTY); bean.setIntProperty(INT_PROPERTY); bean.setBoolProperty(BOOL_PROPERTY); assertEquals(INT_PROPERTY, extractor.readValue(bean, "intProperty")); assertEquals(STRING_PROPERTY, extractor.readValue(bean, "stringProperty")); assertEquals(BOOL_PROPERTY, extractor.readValue(bean, "boolProperty")); }
@Test public void testWithWrongProperty() { assertNull(extractor.readValue(bean, "nonExistingProperty")); }
@Test public void testWithEmptyModel() { assertNull(extractor.readValue(null, null)); }