StoreCredit { static <E extends Comparable<E>> void insertionSort(List<E> inputs, final int p, final int r) { for (int i = p + 1; i <= r; i++) insert(inputs, p, i, inputs.get(i)); }    }
@Test public void testInsertSort() { List<Integer> unsorted = Arrays.asList(9, 10, 1, 2, 56, 4, 5, 11, 3); List<Integer> sorted = Arrays.asList(1, 2, 3, 4, 5, 9, 10, 11, 56); StoreCredit.insertionSort(unsorted, 0, unsorted.size() - 1); assertArrayEquals(sorted.toArray(), unsorted.toArray()); }