@Test
public void getBeanPropertyOnlyGetter() throws Exception {

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