de/serialization tests for messages