String (@NotNull PsiMethod method) { final PsiClass psiClass = PsiTreeUtil.getParentOfType(method, PsiClass.class); if (psiClass == null) { return null; } TestFramework framework = TestFrameworks.detectFramework(psiClass); if (framework == null || !framework.isTestMethod(method)) { return null; } return getTestName(method.getName()); }