def METHOD_NAME(client, sample_service):
    all_inbound_sms = [
        create_inbound_sms(service=sample_service, user_number="447700900111", content="Hi"),
        create_inbound_sms(service=sample_service, user_number="447700900112"),
        create_inbound_sms(service=sample_service, user_number="447700900111", content="Bye"),
        create_inbound_sms(service=sample_service, user_number="07700900113"),
    ]
    auth_header = create_authorization_header(service_id=sample_service.id)
    response = client.get(
        path="/v2/received-text-messages",
        headers=[("Content-Type", "application/json"), auth_header],
    )
    assert response.status_code == 200
    assert response.headers["Content-type"] == "application/json"
    json_response = json.loads(response.get_data(as_text=True))["received_text_messages"]
    reversed_all_inbound_sms = sorted(all_inbound_sms, key=lambda sms: sms.created_at, reverse=True)
    expected_response = [i.serialize() for i in reversed_all_inbound_sms]
    assert json_response == expected_response