test for pagination