GlobalMeasure { public double getDensity() { return density; } 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 testDensity() { GlobalMeasure test1 = new GlobalMeasure(2, 2, 0.0d); GlobalMeasure test2 = new GlobalMeasure(10, 5, 0.0d); GlobalMeasure test3 = new GlobalMeasure(1, 1, 0.0d); assertEquals(1.0d, test1.getDensity(), 0.001); assertEquals(0.055d, test2.getDensity(), 0.001); assertEquals(1, test3.getDensity(), 0.001); }