def METHOD_NAME(self, stub_broker, do_work, state_ttl):
    backend = Mock()
    stub_broker.add_middleware(MessageState(backend=backend, state_ttl=state_ttl))
    do_work.send()
    assert backend.set_state.call_count == 0