sort the array in test