CollectionsTool extends CollectionTool { public <E extends Comparable<E>> boolean sort(List<E> input) { return super.sortModifiable(input); }  boolean reverse(List<E> input); boolean sort(List<E> input);  }
@Test void testSort() { List<String> list = this.tool.getLinkedList(); list.add("one"); list.add("two"); list.add("three"); assertTrue(this.tool.sort(list), "Failed to sort the list"); assertEquals("one", list.get(0), "List wasn't properly sorted"); assertEquals("three", list.get(1), "List wasn't properly sorted"); assertEquals("two", list.get(2), "List wasn't properly sorted"); this.tool.reverse(list); List<String> readonly = this.tool.unmodifiable(list); assertFalse(this.tool.sort(readonly), "Unmodifiable list wrongly sorted"); assertEquals("two", list.get(0), "Unmodifiable list was changed"); list = null; assertFalse(this.tool.sort(list), "Sorted a null list?"); }