Payload serialization tests.