@@ -0,0 +1,693 @@
+package com.jeffreydiaz.test.sorting;%0A%0Aimport com.jeffreydiaz.sorting.Insertion;%0A%0Aimport org.junit.Test;%0A%0Aimport java.util.Random;%0A%0Aimport static org.junit.Assert.assertTrue;%0A%0A/**%0A * Test class for Insertion.%0A * @author Jeffrey Diaz%0A */%0Apublic class InsertionTest %7B%0A%0A%09@Test%0A%09public void TestSorting()%0A%09%7B%0A%09%09Integer%5B%5D values = new Integer%5B1000%5D;%0A%09%09Random random = new Random();%0A%0A%09%09for (int i = 0; i %3C values.length; ++i) %7B%0A%09%09%09values%5Bi%5D = random.nextInt();%0A%09%09%7D%0A%0A%09%09Insertion.sort(values);%0A%09%09assertTrue(isSorted(values));%0A%09%7D%0A%0A%09private boolean isSorted(Integer%5B%5D values)%0A%09%7B%0A%09%09for (int i = 1; i %3C values.length; ++i) %7B%0A%09%09%09if (values%5Bi%5D %3C values%5Bi-1%5D) %7B%0A%09%09%09%09return false;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return true;%0A%09%7D%0A%7D%0A

Test class for Insertion.java.