@Test
public void resetTest() throws IOException {

  File tempFile = newTestFile(true);
  String target = tempFile.getAbsolutePath();
  logger.info("Target: {}", target);
  TransientPositionTracker tracker = new TransientPositionTracker(target);
  AvroEventDeserializer.Builder desBuilder =
      new AvroEventDeserializer.Builder();
  EventDeserializer deserializer = desBuilder.build(new Context(),
      new ResettableFileInputStream(tempFile, tracker));
  BinaryDecoder decoder = null;
  DatumReader<GenericRecord> reader =
      new GenericDatumReader<GenericRecord>(schema);
  decoder = DecoderFactory.get().binaryDecoder(
      deserializer.readEvent().getBody(), decoder);
  assertEquals("bar", reader.read(null, decoder).get("foo").toString());
  deserializer.reset();
  decoder = DecoderFactory.get().binaryDecoder(
      deserializer.readEvent().getBody(), decoder);
  assertEquals("bar", reader.read(null, decoder).get("foo").toString());
  deserializer.mark();
  decoder = DecoderFactory.get().binaryDecoder(
      deserializer.readEvent().getBody(), decoder);
  assertEquals("baz", reader.read(null, decoder).get("foo").toString());
  deserializer.reset();
  decoder = DecoderFactory.get().binaryDecoder(
      deserializer.readEvent().getBody(), decoder);
  assertEquals("baz", reader.read(null, decoder).get("foo").toString());
  assertNull(deserializer.readEvent());
}