final NodePath nodePath = NodePath.with("reference", "reference");
// verify that the node can be found when it's not excluded
ObjectDiffer objectDiffer = ObjectDifferBuilder.startBuilding().build();
final DiffNode verification = objectDiffer.compare(obj1, modifiedObj1);
verification.visit(new PrintingVisitor(obj1, modifiedObj1));
assertThat(verification).child(nodePath).hasState(DiffNode.State.CHANGED).hasChildren(1);
// verify that the node can't be found, when it's excluded
final ObjectDifferBuilder objectDifferBuilder = ObjectDifferBuilder.startBuilding();
objectDifferBuilder.inclusion().exclude().node(nodePath);
objectDiffer = objectDifferBuilder.build();
final DiffNode node = objectDiffer.compare(obj1, modifiedObj1);
node.visit(new PrintingVisitor(obj1, modifiedObj1));
assertThat(node).child(nodePath).doesNotExist();
}