### Question:
Sorting { public static void parallelSort(double[] dValues, int[] iValues) { quickSort(new DoubleIntIndexedSortable(dValues, iValues)); } private  Sorting(); static int selectPivotIndex(final int[] indices, 
        int left, 
        int right, 
        final IntComparator comp); static int partitionIndices(
            final int[] indices,
            final int k0,
            final int left0,
            final int right0,
            final IntComparator comp); static void quickSort(final IndexedSortable sortable); static void quickSort(final IndexedSortable sortable, final int offset, final int len); static void quickSort(final int[] arr, final IntComparator comp); static void quickSort(final int[] arr, final int offset, final int len, final IntComparator comp); static int medianOf3(final int[] a, final int x, final int y, final int z, final IntComparator c); static int medianOf3(IndexedSortable sortable, int x, int y, int z); static void parallelSort(double[] dValues, int[] iValues);  }### Answer:
@Test public void testParallelSort() { final int numValues = 1000; double[] dValues = new double[numValues]; int[] iValues = new int[numValues]; Map<Double, Integer> checkMap = new HashMap<Double, Integer>(); Random random = new Random(); for (int i = 0; i < numValues; i++) { double d = random.nextDouble(); dValues[i] = d; iValues[i] = i; checkMap.put(d, i); } double[] dValuesCopy = (double[]) dValues.clone(); Sorting.parallelSort(dValues, iValues); Arrays.sort(dValuesCopy); for (int i = 0; i < numValues; i++) { assertTrue(dValuesCopy[i] == dValues[i]); assertTrue(checkMap.get(dValues[i]).intValue() == iValues[i]); } }