def METHOD_NAME():
    # Run async task
    c = Callable(hang_timeout=WAIT_TIMEOUT)
    with async_task(c, "task-id") as t:
        # Check it is preparing
        status = t.getStatus()
        assert status == {
            "result": "",
            "state": {"code": 0, "message": "Task is initializing"},
            "task": {"id": "task-id", "state": "preparing"}
        }
        # Stop task and wait for a done state
        assert not c.is_finished()
        with t.abort_callback(c.finish):
            t.stop()
        assert t.wait(timeout=WAIT_TIMEOUT), "Task is not stopped"
        # Check task's final status
        assert c.is_finished()
        status = t.getStatus()
        assert status == {
            "result": "",
            "state": {
                "code": 0,
                "message": ("Task prepare failed: Task is aborted: "
                            "'value=Unknown error encountered "
                            "abortedcode=411'")
            },
            "task": {"id": "task-id", "state": "failed"}
        }