def METHOD_NAME(self, max_size, stub_broker, state_backend, do_work):
    @remoulade.actor
    def do_work(x):
        return x
    state_backend.max_size = max_size
    stub_broker.add_middleware(MessageState(backend=state_backend))
    stub_broker.declare_actor(do_work)
    long_string = "".join("a" for _ in range(256))
    msg = do_work.send(long_string)
    args = state_backend.get_state(msg.message_id).args
    # if the max_size == 0, then should not storage nothing
    if max_size > 200:
        assert list(args) == [long_string]
    else:
        assert args is None