Update assertions of tests of query api.

This was left behind after I've changed the query api to allow sorting only
on a single field of the query.