@Test
public void writeToByteBufferWorks() throws IOException {

    final ByteBuffer allocate = ByteBuffer.allocate(512);
    cborFactory.writeToByteBuffer(testValue, allocate);
    allocate.flip();
    assertThat(BinaryToHexConverter.toHexString(allocate)).isEqualTo(CborTestUtils.serializeToHexString(testValue));
}