Sorted array tests