Added tests for message serialization