PsiMethod (PsiClass clazz) { PsiMethod testMethod = null; for (PsiMethod method : clazz.getMethods()) { if (isTestMethod(MethodLocation.elementInClass(method, clazz)) || isSuiteMethod(method)) { testMethod = method; break; } } return testMethod; }