boolean (Class<?> klass) { for (Class<?> currentClass = klass; Test.class.isAssignableFrom(currentClass); currentClass = currentClass.getSuperclass()) { for (Method each : MethodSorter.getDeclaredMethods(currentClass)) { if (isTestMethod(each)) return true; } } return false; }