IdPath { @Override public String toString() { String result = ""; for (int part : myParts) { result += part + "."; } return result.substring(0, result.length() - 1); } IdPath(int... parts);  IdPath(Stream s); void write(Stream s); int getId(); IdPath getParent(); IdPath appendedWith(int id); boolean isChildOrParentOf(IdPath p); boolean contains(int id); boolean startsWith(IdPath p); boolean rootEquals(int id); IdPath withoutRoot(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void testToString() { assertEquals("1.2.3", new IdPath(1, 2, 3).toString()); }