HeartbeatResponseDto { public Set<String> getStateLinks() { return stateLinks; } HeartbeatResponseDto(); Set<String> getStateLinks();  }
@Test public void test() throws IOException { HeartbeatResponseDto res = new HeartbeatResponseDto(); res.getStateLinks().add( "one" ); res.getStateLinks().add( "two" ); res.getStateLinks().add( "three" ); byte[] data = JsonUtil.toCbor( res ); HeartbeatResponseDto res2 = JsonUtil.fromCbor( data, HeartbeatResponseDto.class ); assertEquals( res.getStateLinks(), res2.getStateLinks() ); }