def METHOD_NAME(self, config, app_spec, deployment):
    config.datadog_container_image = CONTAINER_IMAGE_LATEST
    config.datadog_activate_sleep = True
    datadog = DataDog(config)
    datadog_spec = app_spec.datadog._replace(enabled=True)
    app_spec = app_spec._replace(datadog=datadog_spec)
    datadog.apply(deployment, app_spec, False, 5)
    expected = {"preStop": {"exec": {"command": ["sleep", "5"]}}}
    assert expected == deployment.as_dict()["spec"]["template"]["spec"]["containers"][-1]["lifecycle"]