boolean (@Nullable PsiClass aClass, boolean runWithIsTestClass) { if (aClass == null) return false; if (AnnotationUtil.isAnnotated(aClass, RUN_WITH, CHECK_HIERARCHY)) return runWithIsTestClass; if (InheritanceUtil.isInheritor(aClass, JUnitCommonClassNames.JUNIT_FRAMEWORK_TEST_CASE)) return false; // test will run with JUnit 3 for (final PsiMethod method : aClass.getAllMethods()) { if (isExplicitlyJUnit4TestAnnotated(method)) return true; } return false; }