test sort feature in search method