Add query testcases for filtering, sorting and stuff.