Apply sorting to entity lists to make test cases more robust to different systems' behaviour