@Test
public void testCollectBeanInfo() {

    Map<String, PropertyDescriptor> name2descriptor = new HashMap<String, PropertyDescriptor>();
    ClassUtil.collectBeanInfo(TestInterface.class, name2descriptor);
    assertEquals(MAP_SIZE, name2descriptor.size());
    PropertyDescriptor descriptor = name2descriptor.get("value");
    assertEquals("value", descriptor.getName());
    assertEquals(int.class, descriptor.getPropertyType());
    assertNotNull(descriptor.getReadMethod());
    assertNotNull(descriptor.getWriteMethod());
    descriptor = name2descriptor.get("value2");
    assertEquals("value2", descriptor.getName());
    assertEquals(long.class, descriptor.getPropertyType());
    assertNotNull(descriptor.getReadMethod());
    assertNull(descriptor.getWriteMethod());
    descriptor = name2descriptor.get("value3");
    assertEquals("value3", descriptor.getName());
    assertEquals(String.class, descriptor.getPropertyType());
    assertNull(descriptor.getReadMethod());
    assertNotNull(descriptor.getWriteMethod());
}