Add encode/decode test of protobuff messages and helper functions.