ConfigurationNode { @Override public String toString() { return toStringHelper(this) .add("id", id) .add("label", label) .add("path", path) .toString(); } ConfigurationNode(final String id, final String label, final String path); String getId(); String getLabel(); void setLabel(final String label); String getPath(); void setPath(final String path); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void testToString() throws Exception { ConfigurationNode node1 = new ConfigurationNode("id", "label", "path"); ConfigurationNode node2 = new ConfigurationNode("id", "label", "path"); assertNotNull(node1.toString()); assertEquals(node1.toString(), node2.toString()); }