Updated unittest for sorting