def METHOD_NAME(
    self, app_spec, lifecycle, lifecycle_subject, deployer, adapter, annotations, repository
):
    if annotations:
        app_spec = app_spec._replace(annotations=LabelAndAnnotationSpec(*[annotations] * 7))
    deployer._queue = [DeployerEvent("UPDATE", app_spec, lifecycle_subject)]
    adapter.deploy.side_effect = Exception("message")
    deployer()
    lifecycle.state_change_signal.send.assert_called_with(status=STATUS_FAILED, subject=lifecycle_subject)