boolean (PsiMethod method) { final String name = method.getName(); if (!"setUp".equals(name) && !"tearDown".equals(name)) { return false; } if (!method.getParameterList().isEmpty()) { return false; } final PsiClass aClass = method.getContainingClass(); return InheritanceUtil.isInheritor(aClass, "junit.framework.TestCase"); }