'1. Given a string, parse it to get Avro protocol "original".
2. Serialize "original" to a string and parse that string
to generate Avro protocol "round trip".
3. Ensure "original" and "round trip" protocols are equivalent.'

def test_equivalence_after_round_trip(self):

    print ''
    print 'TEST    ROUND    TRIP'
    print '==============='
    print ''
    num_correct = 0
    for example in VALID_EXAMPLES:
        original_protocol = protocol.parse(example.protocol_string)
        round_trip_protocol = protocol.parse(str(original_protocol))
        if (original_protocol == round_trip_protocol):
            num_correct += 1
            debug_msg = ('%s:    ROUND    TRIP    SUCCESS' % example.name)
        else:
            self.fail('Round    trip    failure:    %s    %s    %s', (example.name, example.protocol_string, str(original_protocol)))
    fail_msg = ('Round    trip    success    on    %d    out    of    %d    protocols' % (num_correct, len(VALID_EXAMPLES)))
    self.assertEqual(num_correct, len(VALID_EXAMPLES), fail_msg)
