public static void sort(short[] array, ShortComparator comparator) {
        sort(array, 0, array.length, comparator);
    }
@Test
    void test_complicated_array() {
        short[] array = {20381, -28785, -19398, 17307, -12612, 11459, -30164, -16597, -4267, 30838, 8918, 9014, -26444,
                -1232, -14620, 12636, -12389, -4931, 32108, 19854, -12681, 14933, 319, 27348, -4907, 19196, 14209,
                -32694, 2579, 9771, -1157, -13717, 28506, -8016, 21423, 23697, 23755, 29650, 25644, -14660, -18952,
                25272, -19933, -11375, -32363, -11766, -29509, -23898, 12398, -2600, -20703, -23812, -8292, -1605,
                28642, 12748, 2547, -14535, 4476, -7802};
        short[] expected = Arrays.copyOf(array, array.length);
        Arrays.sort(expected);
        PrimitiveArraySorter.sort(array, Short::compare);
        assertArrayEquals(expected, array);
    }