Removed unused test and simplified validateSort