Add sorted check to get endpoint test

Test Plan: -

Reviewers: lydia, dyschultz, marcua

Reviewed By: marcua

Differential Revision: https://phabricator.locu.com/D7156