### Question:
DurationConverter implements BytesConverter<Duration> { @Override public byte[] toBytes(Duration value) { return longConverter.toBytes(value.toMillis()); } DurationConverter(BytesConverter<Long> longConverter); @Override Duration fromBytes(byte[] bytes); @Override byte[] toBytes(Duration value); static final BytesConverter<Duration> INSTANCE; }### Answer:
@Test public void testToBytes() { assertArrayEquals(new byte[] {51, 127, -104, 0}, DurationConverter.INSTANCE.toBytes(Duration.ofDays(10))); }