@Test
public void testGetModifiedFields() throws Exception {

    TestBean cg0 = new TestBean();
    TestBean cg1 = new TestBean();
    cg1.setAlias("aaa:1.0.0");
    cg1.setHeartbeat(2222);
    cg1.setRegister(true);
    TestBean cg2 = new TestBean();
    cg2.setAlias("aaa:1.0.0");
    cg2.setHeartbeat(2222);
    cg2.setRegister(false);
    cg2.setSubBeans(new ArrayList<TestSubBean>());
    Assert.assertTrue(BeanUtils.getModifiedFields(cg0, cg1).size() == 3);
    Assert.assertTrue(BeanUtils.getModifiedFields(cg0, cg2).size() == 3);
    Assert.assertTrue(BeanUtils.getModifiedFields(cg1, cg2).size() == 2);
}