Corrected test_random_protocol()