Integration tests for query paging