@Test
void getProperties() {

    MyClass myClass = new MyClass();
    MyClass myChildClass1 = new MyClass();
    MyClass myChildClass2 = new MyClass();
    myClass.setMyClass(myChildClass1);
    final Map<String, PropertyUtil.Prop> propMap = PropertyUtil.getProperties(myClass);
    assertThat(propMap)
            .hasSize(4);
    assertThat(propMap.values().stream()
                .map(PropertyUtil.Prop::getParentObject)
                .map(System::identityHashCode)
                .distinct()
                .collect(Collectors.toList()))
            .containsExactly(System.identityHashCode(myClass));
    testProp(propMap, "myBoolean", true, false, myClass::isMyBoolean, boolean.class);
    testProp(propMap, "myInt", 99, 101, myClass::getMyInt, int.class);
    testProp(propMap, "myString", "abc", "def", myClass::getMyString, String.class);
    testProp(propMap, "myClass", myChildClass1, myChildClass2, myClass::getMyClass, MyClass.class);
}