public abstract WriteOperation<DestinationT, OutputT> createWriteOperation();
@Test
  public void testFileBasedWriterWithWritableByteChannelFactory() throws Exception {
    final String testUid = "testId";
    ResourceId root = getBaseOutputDirectory();
    WriteOperation<Void, String> writeOp =
        SimpleSink.makeSimpleSink(
                root, "file", "-SS-of-NN", "txt", new DrunkWritableByteChannelFactory())
            .createWriteOperation();
    final Writer<Void, String> writer = writeOp.createWriter();
    final ResourceId expectedFile =
        writeOp
            .getTempDirectory()
            .resolve(Writer.spreadUid(testUid), StandardResolveOptions.RESOLVE_FILE);

    final List<String> expected = new ArrayList<>();
    expected.add("header");
    expected.add("header");
    expected.add("a");
    expected.add("a");
    expected.add("b");
    expected.add("b");
    expected.add("footer");
    expected.add("footer");

    writer.open(testUid);
    writer.write("a");
    writer.write("b");
    writer.close();
    assertEquals(expectedFile, writer.getOutputFile());
    assertFileContains(expected, expectedFile);
  }