### Question:
AvroFileInputReader extends AbstractFileInputReader { @Override protected FileInputIterator<FileRecord<TypedStruct>> newIterator(final FileContext context, final IteratorManager iteratorManager) { return new AvroFileIterator(iteratorManager, context); } AvroFileInputReader();   }### Answer:
@Test public void shouldReadGivenMultipleAvroRecord() { writeGenericRecords( DEFAULT_TEST_SCHEMA, DEFAULT_GENERIC_RECORD, DEFAULT_GENERIC_RECORD, DEFAULT_GENERIC_RECORD); FileInputIterator<FileRecord<TypedStruct>> iterator = reader.newIterator(context); assertTrue(iterator.hasNext()); int records = 0; while (iterator.hasNext()) { iterator.next(); records++; } assertEquals(3, records); }
@Test public void shouldSeekToGivenAValidPosition() { writeGenericRecords( DEFAULT_TEST_SCHEMA, DEFAULT_GENERIC_RECORD, DEFAULT_GENERIC_RECORD, DEFAULT_GENERIC_RECORD); FileInputIterator<FileRecord<TypedStruct>> iterator = reader.newIterator(context); assertTrue(iterator.hasNext()); RecordsIterable<FileRecord<TypedStruct>> next = iterator.next(); final FileRecordOffset offset = next.last().offset(); iterator.close(); iterator = reader.newIterator(context); iterator.seekTo(offset.toSourceOffset()); assertTrue(iterator.hasNext()); int records = 0; while (iterator.hasNext()) { iterator.next(); records++; } assertEquals(2, records); }