Added tests for SortSimilar