Added pagination test to query builder