def METHOD_NAME(self):
    """
    Test a protocol with preamble, sync, length field, 2 participants and addresses and seq nr and random data
    :return:
    """
    mb = MessageTypeBuilder("medium_test")
    mb.add_label(FieldType.Function.PREAMBLE, 8)
    mb.add_label(FieldType.Function.SYNC, 8)
    mb.add_label(FieldType.Function.LENGTH, 8)
    mb.add_label(FieldType.Function.SRC_ADDRESS, 16)
    mb.add_label(FieldType.Function.DST_ADDRESS, 16)
    mb.add_label(FieldType.Function.SEQUENCE_NUMBER, 16)
    alice = Participant("Alice", "A", "1234", color_index=0)
    bob = Participant("Bob", "B", "5a9d", color_index=1)
    num_messages = 100
    pg = ProtocolGenerator([mb.message_type], syncs_by_mt={mb.message_type: "0x1c"}, little_endian=False)
    for i in range(num_messages):
        len_data = random.randint(1, 5)
        data = "".join(pg.decimal_to_bits(random.randint(0, 2 ** 8 - 1), 8) for _ in range(len_data))
        if i % 2 == 0:
            source, dest = alice, bob
        else:
            source, dest = bob, alice
        pg.generate_message(data=data, source=source, destination=dest)
    self.save_protocol("medium", pg)
    plt.subplot(2, 2, 1)
    plt.title("All messages")
    bitvectors = FormatFinder.get_bitvectors_from_messages(pg.protocol.messages)
    h = Histogram(bitvectors)
    h.subplot_on(plt)
    for i, (participant, bitvectors) in enumerate(
            sorted(self.get_bitvectors_by_participant(pg.protocol.messages).items())):
        plt.subplot(2, 2, i + 3)
        plt.title("Messages with participant {} ({})".format(participant.shortname, len(bitvectors)))
        Histogram(bitvectors).subplot_on(plt)
    if SHOW_PLOTS:
        plt.show()