Add unittest for generated messages.