Add unit tests for protocol messages and some new messages.