void (Map<VirtualFile, Collection<Change>> expected, Map<VirtualFile, Collection<Change>> actual) { assertEquals("Maps size is different. " + expectedActualMessage(expected, actual), expected.size(), actual.size()); for (Map.Entry<VirtualFile, Collection<Change>> expectedEntry : expected.entrySet()) { VirtualFile root = expectedEntry.getKey(); if (!actual.containsKey(root)) { fail("Didn't find root [" + root + "]. " + expectedActualMessage(expected, actual)); } List<Change> expectedChanges = new ArrayList<>(expectedEntry.getValue()); List<Change> actualChanges = new ArrayList<>(actual.get(root)); Collections.sort(expectedChanges, ChangesComparator.getInstance(false)); Collections.sort(actualChanges, ChangesComparator.getInstance(false)); assertEquals("Changes not equal for root [" + root + "]. " + expectedActualMessage(expected, actual), expectedChanges, actualChanges); } }