def METHOD_NAME(self, stub_broker, stub_worker, state_middleware, do_work):
    class SkipMiddleware(Middleware):
        def before_process_message(self, broker, message):
            raise SkipMessage()
    stub_broker.add_middleware(SkipMiddleware())
    msg = do_work.send()
    stub_broker.join(do_work.queue_name)
    stub_worker.join()
    state = state_middleware.backend.get_state(msg.message_id)
    assert state.status == StateStatusesEnum.Skipped
    # should not finish, since is skipped and does not
    # try again
    assert state.end_datetime is None