RollingMedian { void remove(double n) { if (!isEmpty()) { if (Double.compare(n, median()) <= 0) { maxheap.remove(n); } else { minheap.remove(n); } } fixChaos(); }    }
@Test public void testRemove() { testThreeElements(); victim.remove(7); assertMedian(5.5); }