public static Optional<Method> findMethodTransitively(Class<?> clazz, String methodName) {
        if ( clazz == null ) {
            return Optional.empty();
        }

        try {
            return Optional.of(clazz.getDeclaredMethod(methodName));
        } catch ( NoSuchMethodException e ) {
            return findMethodTransitively(clazz.getSuperclass(), methodName);
        }

    }
Iterates over all super classes of the given class (including the class itself)
and calls action.act() for these classes.
jgiven-core/src/main/java/com/tngtech/jgiven/impl/util/ReflectionUtil.java