public SequenceFile.Writer createWriter(File file) throws IOException {
    return createWriter(toPath(file));
  }
@Test
  public void testCreateWriteReadFileOneEntry() throws Throwable {

    final FileEntry source = ENTRY;

    // do an explicit close to help isolate any failure.
    SequenceFile.Writer writer = createWriter();
    writer.append(NullWritable.get(), source);
    writer.flush();
    writer.close();

    FileEntry readBack = new FileEntry();
    try (SequenceFile.Reader reader = readEntryFile()) {
      reader.next(NullWritable.get(), readBack);
    }
    Assertions.assertThat(readBack)
        .describedAs("entry read back from sequence file")
        .isEqualTo(source);

    // now use the iterator to access it.
    final RemoteIterator<FileEntry> it =
        iterateOverEntryFile();
    List<FileEntry> files = new ArrayList<>();
    foreach(it, files::add);
    Assertions.assertThat(files)
        .describedAs("iteration over the entry file")
        .hasSize(1)
        .element(0)
        .isEqualTo(source);
    final EntryFileIO.EntryIterator et = (EntryFileIO.EntryIterator) it;
    Assertions.assertThat(et)
        .describedAs("entry iterator %s", et)
        .matches(p -> p.isClosed())
        .extracting(p -> p.getCount())
        .isEqualTo(1);
  }