@Test
public void getBeanPropertyAddOrSet() throws Exception {

    TestBeanE bean = new TestBeanE();
    // 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(true, property.canSet());
    Assert.assertEquals(true, property.canAdd());
    Assert.assertEquals(true, property.canAddOrSet());
    Assert.assertEquals(null, property.getField());
    Assert.assertEquals(TestBeanE.class.getDeclaredMethod("addHost", String.class), property.getAddMethod());
    Assert.assertEquals(TestBeanE.class.getDeclaredMethod("setHost", String.class), property.getSetMethod());
    Assert.assertEquals(null, property.getGetMethod());
    // verify that the "addHost" method takes precedence over the "setHost"
    property.addOrSet(bean, "www.google.com");
    Assert.assertEquals("www.google.com", bean.addhost);
    Assert.assertEquals(null, bean.sethost);
}