public static int[] sort(int[] array) {
        int[] order = new int[array.length];
        for (int i = 0; i < order.length; i++) {
            order[i] = i;
        }
        sort(array, order);
        return order;
    }
@Test
    public void testSortDouble() {
        System.out.println("sort double");
        double[] data1 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
        int[] order1 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
        assertArrayEquals(order1, QuickSort.sort(data1));
        double[] data2 = {9, 8, 7, 6, 5, 4, 3, 2, 1, 0};
        int[] order2 = {9, 8, 7, 6, 5, 4, 3, 2, 1, 0};
        assertArrayEquals(order2, QuickSort.sort(data2));
        double[] data3 = {0, 1, 2, 3, 5, 4, 6, 7, 8, 9};
        int[] order3 = {0, 1, 2, 3, 5, 4, 6, 7, 8, 9};
        assertArrayEquals(order3, QuickSort.sort(data3));
        double[] data4 = {4, 1, 2, 3, 0, 5, 6, 7, 8, 9};
        int[] order4 = {4, 1, 2, 3, 0, 5, 6, 7, 8, 9};
        assertArrayEquals(order4, QuickSort.sort(data4));
    }