Add unit-tests for paging