public static Map<String, Method> getBeanPropertyReadMethods(Class cl) {
        Map<String, Method> properties = new HashMap<>();
        for (; cl != null; cl = cl.getSuperclass()) {
            Method[] methods = cl.getDeclaredMethods();
            for (Method method : methods) {
                if (isBeanPropertyReadMethod(method)) {
                    method.setAccessible(true);
                    String property = getPropertyNameFromBeanReadMethod(method);
                    properties.put(property, method);
                }
            }
        }

        return properties;
    }
@Test
    void testGetBeanPropertyReadMethods() {
        Map<String, Method> map = ReflectUtils.getBeanPropertyReadMethods(EmptyClass.class);
        assertThat(map.size(), is(2));
        assertThat(map, hasKey("set"));
        assertThat(map, hasKey("property"));
        for (Method m : map.values()) {
            if (!m.isAccessible()) {
                fail();
            }
        }
    }