void (PsiClass beforeClass, PsiClass afterClass) { PsiMethod[] beforeMethods = beforeClass.getMethods(); PsiMethod[] afterMethods = afterClass.getMethods(); assertEquals("Methods are different for Class: " + beforeClass.getName(), Arrays.toString(toList(afterMethods)), Arrays.toString(toList(beforeMethods))); for (PsiMethod afterMethod : afterMethods) { final Collection<PsiMethod> matchedMethods = filterMethods(beforeMethods, afterMethod); if (matchedMethods.isEmpty()) { fail("Method names are not equal, Method: " + afterMethod.getPresentation().getPresentableText() + " not found in class : " + beforeClass.getName()); } for (PsiMethod beforeMethod : matchedMethods) { compareMethod(beforeClass, afterClass, afterMethod, beforeMethod); } } }