@Test
public void testMultiRollingFileFailedWriteOverwriteCache1() throws IOException
{

  EvenOddHDFSExactlyOnceWriter writer = new EvenOddHDFSExactlyOnceWriter();
  writer.setMaxOpenFiles(1);
  String evenFileName = testMeta.getDir() + File.separator + EVEN_FILE;
  String oddFileName = testMeta.getDir() + File.separator + ODD_FILE;
  populateFile(EVEN_FILE + ".0", "0\n" + "2\n" + "4\n");
  populateFile(ODD_FILE + ".0", "1\n" + "3\n" + "5\n");
  testMultiRollingFileFailedWriteOverwriteHelperCache1(writer);
  //Even file
  String correctContents = "0\n" + "4\n" + "6\n";
  checkOutput(0, evenFileName, correctContents);
  correctContents = "8\n" + "6\n" + "10\n";
  checkOutput(1, evenFileName, correctContents);
  //Odd file
  correctContents = "1\n" + "5\n" + "7\n";
  checkOutput(0, oddFileName, correctContents);
  correctContents = "9\n" + "7\n" + "11\n";
  checkOutput(1, oddFileName, correctContents);
}