### Question:
Node { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Node)) { return false; } Node otherNode = (Node) o; return this.nodeBody.equals(otherNode.nodeBody); } Node(NodeBody nodeBody); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testEquals() { Node a = Node.fromString("hello"); Node b = Node.fromString("world"); Node c = Node.fromString("world"); assertNotEquals(a, b); assertEquals(b, c); Node d = Node.fromPieces(Arrays.asList(a, b)); assertNotEquals(a, d); Node e = Node.fromPieces(Arrays.asList(a, c)); assertEquals(d, e); }