Point { @Override public String toString() { return "Point [x=" + x + ", y=" + y + ", z=" + z + "]"; } protected  Point(Point<T> pt); protected  Point(T x, T y, T z); @Override boolean equals(Object obj); void set(Point<T> other); void setX(T x); void setY(T y); void setZ(T z); @Override String toString();  }
@Test public void doublePointToStringTest() { DoublePoint dp = new DoublePoint(1.23, 5.34, 234.23); Assert.assertEquals("Point [x=1.23, y=5.34, z=234.23]", dp.toString()); }
@Test public void longPointToStringTest() { LongPoint lp = new LongPoint(1, 5, 234); Assert.assertEquals("Point [x=1, y=5, z=234]", lp.toString()); }