add testcases for orderedBy