GlobalMeasure { @Override public String toString() { return "size: " + size + ", ties: " + ties + ", diameter: " + diameter; } GlobalMeasure(long size, long ties);  GlobalMeasure(long size, long ties, double diameter); long getSize(); long getTies(); double getDensity(); long getPairs(); double getDiameter(); @Override String toString();  }
@Test public void testToString() { String expResult = "size: 0, ties: 1, diameter: 2.0"; String result = instance.toString(); assertEquals(expResult, result); }