Add testsuite for encoding and decoding of messages