Sorting related tests.