Added Pagination and a unit test for it