Add permutation test cases

Since a sorted array should be a permutation of the original elements.