PsiMethod (@NotNull PsiClass clazz, String methodName) { if (!isTestClass(clazz, false)) return null; for (PsiMethod method : clazz.findMethodsByName(methodName, false)) { if (method.getParameterList().isEmpty()) return method; } return null; }