@Test public void detectsMissingListElements() { Node actual = Node.fromStrings("snap", "crackle"); Node expected = Node.fromStrings("snap", "crackle", "pop"); assertThat(NodeDiff.diff(actual, expected), contains("[]: Expected element (position 2) not encountered in list: \"pop\"")); }
static List<String> diff(ToNode actual, ToNode expected) { return new NodeDiff().findDifferences(actual.toNode(), expected.toNode(), "") .collect(Collectors.toList()); }
NodeDiff { static List<String> diff(ToNode actual, ToNode expected) { return new NodeDiff().findDifferences(actual.toNode(), expected.toNode(), "") .collect(Collectors.toList()); } }
NodeDiff { static List<String> diff(ToNode actual, ToNode expected) { return new NodeDiff().findDifferences(actual.toNode(), expected.toNode(), "") .collect(Collectors.toList()); } NodeDiff(); }
NodeDiff { static List<String> diff(ToNode actual, ToNode expected) { return new NodeDiff().findDifferences(actual.toNode(), expected.toNode(), "") .collect(Collectors.toList()); } NodeDiff();  }
NodeDiff { static List<String> diff(ToNode actual, ToNode expected) { return new NodeDiff().findDifferences(actual.toNode(), expected.toNode(), "") .collect(Collectors.toList()); } NodeDiff();   }