def METHOD_NAME(stub_broker, stub_worker):
    # Given that I have a database
    shutdowns, successes = [], []
    # And an actor that handles shutdown interrupts
    @remoulade.actor(notify_shutdown=True, max_retries=0)
    def do_work():
        try:
            for _ in range(10):
                time.sleep(0.1)
        except shutdown.Shutdown:
            shutdowns.append(1)
            raise
        successes.append(1)
    # And this actor is declared
    stub_broker.declare_actor(do_work)
    # If I send it a message
    do_work.send()
    # Then wait and signal the worker to terminate
    time.sleep(0.1)
    stub_worker.stop()
    # Then join on the queue
    stub_broker.join(do_work.queue_name)
    stub_worker.join()
    # I expect it to shutdown
    assert sum(shutdowns) == 1
    assert sum(successes) == 0