### Question:
NodeRef implements Bounded, Comparable<NodeRef> { @Override public boolean equals(Object o) { if (!(o instanceof NodeRef)) { return false; } NodeRef r = (NodeRef) o; return parentPath.equals(r.parentPath) && node.equals(r.node) && getMetadataId().equals(r.getMetadataId()); } NodeRef(Node node, String parentPath, ObjectId metadataId); String getParentPath(); Node getNode(); String path(); String name(); ObjectId objectId(); ObjectId getMetadataId(); RevObject.TYPE getType(); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(NodeRef o); @Override String toString(); static @Nullable String parentPath(@Nullable String fullPath); static void checkValidPath(final String path); static @Nullable String nodeFromPath(@Nullable String fullPath); static boolean isDirectChild(String parentPath, String nodePath); static boolean isChild(String parentPath, String nodePath); static List<String> allPathsTo(final String path); static ImmutableList<String> split(final String path); static String appendChild(String parentTreePath, String childName); @Override boolean intersects(Envelope env); @Override void expand(Envelope env); static int depth(String path); static String removeParent(final String parentPath, final String childPath); static final String ROOT; static final char PATH_SEPARATOR; }### Answer:
@Test public void testIsEqual() { Node node = Node.create("Points.1", ObjectId.forString("Points stuff"), ObjectId.NULL, TYPE.FEATURE, null); NodeRef nodeRef = new NodeRef(node, "Points", ObjectId.NULL); assertFalse(nodeRef.equals(node)); Node node2 = Node.create("Lines.1", ObjectId.forString("Lines stuff"), ObjectId.NULL, TYPE.FEATURE, null); NodeRef nodeRef2 = new NodeRef(node2, "Lines", ObjectId.NULL); NodeRef nodeRef3 = new NodeRef(node2, "Lines", ObjectId.forString("Lines stuff")); assertFalse(nodeRef.equals(nodeRef2)); assertTrue(nodeRef.equals(nodeRef)); assertFalse(nodeRef2.equals(nodeRef3)); }