'Test with both parameters offset and limit and custom max_limit.'

@ddt.data(('/?offset=1&limit=3', 1, 4), ('/?offset=3&limit=0', 3, 1003), ('/?offset=3&limit=1500', 3, 1003), ('/?offset=3000&limit=10', 0, 0), ('/?offset=1&limit=3', 1, 4, 2000), ('/?offset=3&limit=0', 3, None, 2000), ('/?offset=3&limit=2500', 3, None, 2000), ('/?offset=3000&limit=10', 0, 0, 2000))
@ddt.unpack
def test_limiter_with_offset_limit_max_limit(self, req, slice_start, slice_end, max_limit=None):

    req = webob.Request.blank(req)
    self.assertEqual(ITEMS[slice_start:slice_end], common.limited(ITEMS, req, max_limit=max_limit))
