void (List<? extends VFileEvent> actual, VFileEvent... expected) { Set<VFileEvent> act = new HashSet<>(ContainerUtil.map(actual, e -> ignoreCrazyVFileContentChangedEquals(e))); Set<VFileEvent> exp = new HashSet<>(ContainerUtil.map(expected, e -> ignoreCrazyVFileContentChangedEquals(e))); if (!act.equals(exp)) { String expectedString = UsefulTestCase.toString(Arrays.asList(expected)); String actualString = UsefulTestCase.toString(actual); assertEquals(expectedString, actualString); fail("Warning! 'toString' does not reflect the difference.\nExpected: " + expectedString + "\nActual: " + actualString); } }