Working tests for sort