void (final Node r1, final Node r2, final String... expected) { final DiffBuilder result = new DiffBuilder(); DiffTree.diff(new TreeStructure(r1), new TreeStructure(r2), new NodeComparator(), result, r1.toString()); final List<String> expectedList = Arrays.asList(expected); final List<String> actual = result.getEvents(); if (!expectedList.isEmpty() && !actual.isEmpty()) { assertEquals(expectedList, actual); } }