def METHOD_NAME(monkeypatch):
    page_obj = pretend.stub()
    page_cls = pretend.call_recorder(lambda *a, **kw: page_obj)
    monkeypatch.setattr(paginate, "Page", page_cls)
    assert paginate.ElasticsearchPage("first", second="foo") is page_obj
    assert page_cls.calls == [
        pretend.call(
            "first", second="foo", wrapper_class=paginate._ElasticsearchWrapper
        )
    ]