Pagination service and unit tests