Increase test coverage for pagination.

- Adopt izip for tests so we can consume iterator one by one.