@Test
public void toJson() {
final Set<Ack> acks = acks(ack("abc123", 1L), ack("efg456", 20L));
final String json = JsonUtil.toJson(new AckMessageImpl(acks));
final AckMessage ack = JsonUtil.fromJson(json, AckMessageImpl.class);
assertThat(ack.getMessageType(), is(equalTo(MessageType.Type.ACK)));
assertThat(ack.getAcks(), hasItems(ack("abc123", 1L), ack("efg456", 20L)));
}