Calculator { public Double median() { return values.get((int)Math.ceil(values.size()/2)); } Calculator(); void add(Double value); Double average(); Double median();  }
@Test void testMedian() { assertEquals(4, calculator.median(), 0.01); }