boolean (@Nullable PsiMethod method, List<String> frameworks) { if (method == null) return false; final PsiClass containingClass = method.getContainingClass(); if (containingClass == null) return false; final TestFramework testFramework = TestFrameworks.detectFramework(containingClass); if (testFramework == null) return false; if (testFramework.isTestMethod(method, false)) { return ContainerUtil.exists(frameworks, testFramework.getName()::equals); } return false; }