[Tests] Added tests for sorting methods.