def METHOD_NAME(client, sample_service, mocker):
    mocker.patch.dict("app.v2.inbound_sms.get_inbound_sms.current_app.config", {"API_PAGE_SIZE": 2})
    all_inbound_sms = [
        create_inbound_sms(service=sample_service, user_number="447700900111", content="Hi"),
        create_inbound_sms(service=sample_service, user_number="447700900111"),
        create_inbound_sms(service=sample_service, user_number="447700900111", content="End"),
    ]
    reversed_inbound_sms = sorted(all_inbound_sms, key=lambda sms: sms.created_at, reverse=True)
    auth_header = create_authorization_header(service_id=sample_service.id)
    response = client.get(
        url_for("v2_inbound_sms.get_inbound_sms"),
        headers=[("Content-Type", "application/json"), auth_header],
    )
    assert response.status_code == 200
    json_response = json.loads(response.get_data(as_text=True))
    expected_inbound_sms_list = [i.serialize() for i in reversed_inbound_sms[:2]]
    assert json_response["received_text_messages"] == expected_inbound_sms_list
    assert url_for("v2_inbound_sms.get_inbound_sms", _external=True) == json_response["links"]["current"]
    assert (
        url_for(
            "v2_inbound_sms.get_inbound_sms",
            older_than=reversed_inbound_sms[1].id,
            _external=True,
        )
        == json_response["links"]["next"]
    )