ContentNode extends MimeTypeNode { @Override public int hashCode() { return Objects.hash(id, parentId, name, type, modifiedDate, iconUrl, mimeType, size, path); } ContentNode(final String id, final String parentId, final String name, final File file, final MimeType mimeType); Long getSize(); String getPath(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void testHashCode() throws Exception { File file = File.createTempFile(testName.getMethodName(), "avi"); file.deleteOnExit(); ContentNode node1 = buildContentNode(file); ContentNode node2 = buildContentNode(file); assertNotNull(node1.hashCode()); assertEquals(node1.hashCode(), node2.hashCode()); }