void (PsiClass[] beforeClasses, PsiClass[] afterClasses) { String before = "Before classes: " + Arrays.toString(beforeClasses); String after = "After classes: " + Arrays.toString(afterClasses); assertEquals("Class counts are different " + before + " <> " + after, afterClasses.length, beforeClasses.length); for (PsiClass afterClass : afterClasses) { boolean compared = false; for (PsiClass beforeClass : beforeClasses) { if (Objects.equal(afterClass.getName(), beforeClass.getName())) { compareTwoClasses(beforeClass, afterClass); compared = true; } } assertTrue("Class names are not equal, class (" + afterClass.getName() + ") not found", compared); } }