@Test
public void testSuroKeyedMessage() {
MessageSerDe serde = new MessageSerDe();
for (int k = 0; k < 10; ++k) {
Message msg = new SuroKeyedMessage(
k,
new Message("routingKey", "payload".getBytes()));
byte[] bytes = serde.serialize(msg);
SuroKeyedMessage suroKeyedMessage = (SuroKeyedMessage) serde.deserialize(bytes);
assertEquals(msg, suroKeyedMessage);
assertEquals(suroKeyedMessage.getKey(), k);
}
}