PsiMethod (final PsiClass psiClass) { for (TestFramework framework : TestFramework.EXTENSION_NAME.getExtensionList()) { if (framework.isTestClass(psiClass)) { final PsiMethod setUpMethod = (PsiMethod)framework.findSetUpMethod(psiClass); if (setUpMethod != null) { return setUpMethod; } } } return null; }