### Question:
PropertyAccessor { public void write(final Object bean, final String propertyName, final Object param) { getAccessor(bean.getClass()).write(bean, propertyName, param); } PropertyAccessor(); Object read(final Object bean, final String propertyName); void write(final Object bean, final String propertyName, final Object param); Class<?> getPropertyType(final Class<?> beanClass, final String propertyName); Method getReadMethod(final Class<?> beanClass, final String propertyName); Method getWriteMethod(final Class<?> beanClass, final String propertyName); Collection<PropertyDescriptor> getPropertyDescriptors(final Class<?> beanClass);  }### Answer:
@Test public void testWrite() { final String value = "value"; accessor.write(testBean, TestBean.PROP_NAME, value); Assert.assertEquals(value, testBean.getName()); }