FolderNode extends AbstractNode { @Override public int hashCode() { return Objects.hash(id, parentId, name, type, modifiedDate, iconUrl, path); } FolderNode(final String id, final String parentId, final String name, final File folder);  FolderNode(final String id, final String parentId, final String name); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void testHashCode() throws Exception { FolderNode node1 = buildFolderNode(); FolderNode node2 = buildFolderNode(); assertNotNull(node1.hashCode()); assertEquals(node1.hashCode(), node2.hashCode()); }