ContentNode extends MimeTypeNode { @Override public String toString() { return toStringHelper(this) .add("id", id) .add("type", type) .add("parentId", parentId) .add("name", name) .add("modifiedDate", modifiedDate) .add("iconUrl", iconUrl) .add("mimeType", mimeType) .add("size", size) .add("path", path) .toString(); } 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 testToString() throws Exception { File file = File.createTempFile(testName.getMethodName(), "avi"); file.deleteOnExit(); ContentNode node1 = buildContentNode(file); ContentNode node2 = buildContentNode(file); assertNotNull(node1.toString()); assertEquals(node1.toString(), node2.toString()); }