def METHOD_NAME(sample_notification, mocker):
    mocker.patch(
        "app.delivery.send_to_providers.send_email_to_provider",
        side_effect=InvalidEmailError("bad email"),
    )
    mocker.patch("app.celery.provider_tasks.deliver_email.retry")
    logger = mocker.patch("app.celery.provider_tasks.current_app.logger.info")
    queued_callback = mocker.patch("app.celery.provider_tasks._check_and_queue_callback_task")
    deliver_email(sample_notification.id)
    assert provider_tasks.deliver_email.retry.called is False
    assert sample_notification.status == "technical-failure"
    assert (
        call(f"Cannot send notification {sample_notification.id}, got an invalid email address: bad email.")
        in logger.call_args_list
    )
    queued_callback.assert_called_once_with(sample_notification)