SortedList extends AbstractList<T> { @Override public T remove(int index) { return elements.remove(index); } SortedList(int initialCapacity);  SortedList(Collection<? extends T> c);  SortedList(); @Override T get(int index); @Override int size(); @Override boolean add(T e); @Override T remove(int index); @Override @SuppressWarnings("unchecked") int indexOf(Object o);  }
@Test public void testRemove() { SortedList<Double> l = new SortedList<>(); l.add(0.0); l.add(0.0); l.add(1.0); assertEquals(3, l.size()); l.remove(1); l.remove(1); assertEquals(1, l.size()); }