def METHOD_NAME(mock_dispatch: Mock) -> None:
    partition = Partition(Topic("test"), 0)
    dispatch_function = _get_task_kwargs_and_dispatch
    message = Message(BrokerValue(get_kafka_payload(), partition, 1, datetime.now()))
    dispatch_function(message)
    # Dispatch can take a while
    for _i in range(0, 5):
        if mock_dispatch.call_count:
            break
        time.sleep(0.1)
    mock_dispatch.assert_called_once_with(
        event_id="fe0ee9a2bc3b415497bad68aaf70dc7f",
        project_id=1,
        group_id=43,
        primary_hash="311ee66a5b8e697929804ceb1c456ffe",
        is_new=False,
        is_regression=None,
        is_new_group_environment=False,
        queue="post_process_errors",
        group_states=None,
        occurrence_id=None,
    )