// @Ignore
  @Test
  public void testMultiRollingFileFailedWriteOverwriteCache1() {
    prepareTest();
    EvenOddHDFSExactlyOnceWriter writer = new EvenOddHDFSExactlyOnceWriter();
    writer.setAppend(false);
    writer.setMaxOpenFiles(1);

    testMultiRollingFileFailedWriteOverwriteHelperCache1(writer, ProcessingMode.EXACTLY_ONCE);

    // Even file

    String evenFileName = testMeta.getDir() + File.separator + EVEN_FILE;
    String correctContents = "0\n" + "4\n" + "6\n";
    checkOutput(0, evenFileName, correctContents);

    correctContents = "8\n" + "6\n";
    checkOutput(1, evenFileName, correctContents);

    // Odd file

    String oddFileName = testMeta.getDir() + File.separator + ODD_FILE;

    correctContents = "1\n" + "5\n" + "7\n";
    checkOutput(0, oddFileName, correctContents);

    correctContents = "9\n" + "7\n";
    checkOutput(1, oddFileName, correctContents);
  }
  // @Ignore
  @Test
  public void testMultiRollingFileFailedWriteCache1() {
    prepareTest();
    EvenOddHDFSExactlyOnceWriter writer = new EvenOddHDFSExactlyOnceWriter();
    writer.setAppend(true);
    writer.setMaxOpenFiles(1);

    testMultiRollingFileFailedWriteHelperHelper(writer, ProcessingMode.EXACTLY_ONCE);
  }
  // @Ignore
  @Test
  public void testMultiFileFailedWriteCache1() {
    prepareTest();
    EvenOddHDFSExactlyOnceWriter writer = new EvenOddHDFSExactlyOnceWriter();
    writer.setAppend(true);
    writer.setMaxOpenFiles(1);

    testMultiFileFailedWriteHelper(writer, ProcessingMode.EXACTLY_ONCE);

    String evenFileName = testMeta.getDir() + File.separator + EVEN_FILE;

    String correctContents = "0\n" + "2\n" + "6\n" + "8\n";

    checkOutput(-1, evenFileName, correctContents);

    String oddFileName = testMeta.getDir() + File.separator + ODD_FILE;

    correctContents = "1\n" + "3\n" + "7\n" + "9\n";

    checkOutput(-1, oddFileName, correctContents);
  }
  // @Ignore
  @Test
  public void testMultiFileCompletedWriteOverwriteCache1Initial() {
    prepareTest();
    populateFile(EVEN_FILE, "0\n" + "2\n");
    populateFile(ODD_FILE, "1\n" + "3\n");
    EvenOddHDFSExactlyOnceWriter writer = new EvenOddHDFSExactlyOnceWriter();
    writer.setAppend(false);
    writer.setMaxOpenFiles(1);

    testMultiFileCompletedWriteHelperCache1(writer, ProcessingMode.EXACTLY_ONCE);

    String evenFileName = testMeta.getDir() + File.separator + EVEN_FILE;

    String correctContents = "0\n" + "2\n" + "4\n" + "6\n";

    checkOutput(-1, evenFileName, correctContents);

    String oddFileName = testMeta.getDir() + File.separator + ODD_FILE;

    correctContents = "1\n" + "3\n" + "5\n" + "7\n";

    checkOutput(-1, oddFileName, correctContents);
  }