def METHOD_NAME(self, ttl, result_type, stub_broker, state_backend):
    if type(state_backend) == PostgresBackend:
        pytest.skip("Skipping this test as there is no expiration on PostgresBackend")
    @remoulade.actor
    def wait():
        pass
    stub_broker.add_middleware(MessageState(backend=state_backend, state_ttl=ttl))
    stub_broker.declare_actor(wait)
    msg = wait.send()
    time.sleep(2)
    data = state_backend.get_state(msg.message_id)
    # if the ttl is  greater than the expiration, the data should be None
    assert type(data) == result_type