pagination last page handling test case