Tests for sorted lists