@Override
  protected Object convertSingleValue(Object value) {
    if (value instanceof Instant) {
      return Timestamp.from((Instant) value);
    }
    if (value instanceof GenericFixed) {
      return ((GenericFixed) value).bytes();
    }
    // LocalDate, LocalTime and UUID are returned as the ::toString version of the logical type
    return super.convertSingleValue(value);
  }
@Test
  public void testReusedByteBuffer() {
    byte[] content = new byte[100];
    ThreadLocalRandom.current().nextBytes(content);
    ByteBuffer byteBuffer = ByteBuffer.wrap(content);
    AvroRecordExtractor avroRecordExtractor = new AvroRecordExtractor();
    for (int i = 0; i < 10; i++) {
      Assert.assertEquals(avroRecordExtractor.convertSingleValue(byteBuffer), content);
    }
  }