FolderNode extends AbstractNode { @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("path", path) .toString(); } 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 testToString() throws Exception { FolderNode node1 = buildFolderNode(); FolderNode node2 = buildFolderNode(); assertNotNull(node1.toString()); assertEquals(node1.toString(), node2.toString()); }