def METHOD_NAME(self):
    """
    Test a simple protocol with
    preamble, sync and length field (8 bit) and some random data
    :return:
    """
    mb = MessageTypeBuilder("simple_length_test")
    mb.add_label(FieldType.Function.PREAMBLE, 8)
    mb.add_label(FieldType.Function.SYNC, 16)
    mb.add_label(FieldType.Function.LENGTH, 8)
    num_messages_by_data_length = {8: 5, 16: 10, 32: 15}
    pg = ProtocolGenerator([mb.message_type],
                           syncs_by_mt={mb.message_type: "0x9a9d"})
    random.seed(0)
    for data_length, num_messages in num_messages_by_data_length.items():
        for i in range(num_messages):
            pg.generate_message(data="".join([random.choice(["0", "1"]) for _ in range(data_length)]))
    #self.save_protocol("simple_length", pg)
    self.clear_message_types(pg.protocol.messages)
    ff = FormatFinder(pg.protocol.messages)
    length_engine = LengthEngine(ff.bitvectors)
    highscored_ranges = length_engine.find(n_gram_length=8)
    self.assertEqual(len(highscored_ranges), 3)
    ff.perform_iteration()
    self.assertEqual(len(ff.message_types), 1)
    self.assertGreater(len(ff.message_types[0]), 0)
    label = ff.message_types[0].get_first_label_with_type(FieldType.Function.LENGTH)
    self.assertEqual(label.start, 24)
    self.assertEqual(label.length, 8)