added a number of tests for protocol.