boolean (@Nullable PsiMethod method) { if (method == null) return false; final PsiClass containingClass = method.getContainingClass(); if (containingClass == null) return false; final Set<TestFramework> frameworks = TestFrameworks.detectApplicableFrameworks(containingClass); return ContainerUtil.exists(frameworks, framework -> framework.getName().startsWith("JUnit") && framework.isTestMethod(method, false)); }