Added a test for sorting