@Test
public void testMultipleSplits() throws IOException {

  long fileLength = testAvroFile.length();
  List<FileSplit> splits = new ArrayList<>();
  Path hadoopPath = new Path("file", null,  testAvroFile.getAbsolutePath());
  for (int blockStart = 0; blockStart < fileLength; blockStart += AUTO_SYNC_INTERVAL) {
    splits.add(new FileSplit(hadoopPath, blockStart, AUTO_SYNC_INTERVAL, new String[0]));
  }
  List<String> allRecordKeys = new ArrayList<>();
  long totalFileRecords = 0;
  for (FileSplit split : splits) {
    try (AvroRecordReader reader = new AvroRecordReader()) {
      reader.initializeInternal(split, new Configuration());
      List<String> keysInSplit = collectRecordKeys(reader);
      allRecordKeys.addAll(keysInSplit);
      int recordsInSplit = keysInSplit.size();
      totalFileRecords += recordsInSplit;
      // Not all 'blocks' contain records, but none should have all records
      Truth.assertThat(recordsInSplit)
          .isLessThan(RECORD_COUNT);
    }
  }
  Truth.assertThat(allRecordKeys).containsExactlyElementsIn(allAddedKeys);
  Truth.assertThat(totalFileRecords).isEqualTo(RECORD_COUNT);
}