boolean (@NotNull PsiField field) { if (!super.isAvailable(field)) return false; final PsiClass aClass = field.getContainingClass(); LOG.assertTrue(aClass != null); TestFramework testFramework = TestFrameworks.detectFramework(aClass); final PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(aClass.getProject()); if (!(testFramework instanceof JavaTestFramework javaTestFramework)) return false; try { javaTestFramework.createSetUpPatternMethod(elementFactory); return testFramework.isTestClass(aClass) || testFramework.findSetUpMethod(aClass) instanceof PsiMethod; } catch (Exception e) { return false; } }