@Test
public void getBeanPropertyOnlyAdder() throws Exception {

    TestBeanD bean = new TestBeanD();
    // use utility class to get the "bean" property
    BeanProperty property = BeanUtil.findBeanProperty(bean.getClass(), "host", true);
    Assert.assertEquals(String.class, property.getType());
    Assert.assertEquals("host", property.getName());
    Assert.assertEquals(false, property.canGet());
    Assert.assertEquals(false, property.canSet());
    Assert.assertEquals(true, property.canAdd());
    Assert.assertEquals(null, property.getField());
    Assert.assertEquals(TestBeanD.class.getDeclaredMethod("addHost", String.class), property.getAddMethod());
    Assert.assertEquals(null, property.getSetMethod());
    Assert.assertEquals(null, property.getGetMethod());
}