Added sort to tests