@Test
public void testSchemaHash() throws IOException, NoSuchAlgorithmException {

  File tempFile = newTestFile(true);
  String target = tempFile.getAbsolutePath();
  logger.info("Target: {}", target);
  TransientPositionTracker tracker = new TransientPositionTracker(target);
  Context context = new Context();
  context.put(AvroEventDeserializer.CONFIG_SCHEMA_TYPE_KEY,
      AvroEventDeserializer.AvroSchemaType.HASH.toString());
  ResettableInputStream in =
      new ResettableFileInputStream(tempFile, tracker);
  EventDeserializer des =
      new AvroEventDeserializer.Builder().build(context, in);
  Event event = des.readEvent();
  String eventSchemaHash =
      event.getHeaders().get(AvroEventDeserializer.AVRO_SCHEMA_HEADER_HASH);
  String expectedSchemaHash = Hex.encodeHexString(
      SchemaNormalization.parsingFingerprint("CRC-64-AVRO", schema));
  Assert.assertEquals(expectedSchemaHash, eventSchemaHash);
}