def METHOD_NAME(
    sample_notification,
    mocker,
    sms_method,
    sms_method_name,
):
    mocker.patch(
        "app.delivery.send_to_providers.send_sms_to_provider",
        side_effect=Exception("EXPECTED"),
    )
    mocker.patch(
        f"app.celery.provider_tasks.{sms_method_name}.retry",
        side_effect=MaxRetriesExceededError(),
    )
    queued_callback = mocker.patch("app.celery.provider_tasks._check_and_queue_callback_task")
    with pytest.raises(NotificationTechnicalFailureException) as e:
        sms_method(sample_notification.id)
    assert str(sample_notification.id) in str(e.value)
    getattr(provider_tasks, sms_method_name).retry.assert_called_with(queue="retry-tasks", countdown=0)
    assert sample_notification.status == "technical-failure"
    queued_callback.assert_called_once_with(sample_notification)