@Test
public void testOverwriteFlag() throws IOException, InterruptedException
{

  FileUtils.write(new File(testFM.outputDir, testFM.outputFileName), "");
  long modTime = testFM.underTest.outputFS.getFileStatus(new Path(testFM.outputDir, testFM.outputFileName))
      .getModificationTime();
  when(testFM.fileMetaDataMock.getNumberOfBlocks()).thenReturn(0);
  when(testFM.fileMetaDataMock.isDirectory()).thenReturn(false);
  when(testFM.fileMetaDataMock.getBlockIds()).thenReturn(new long[] {});
  Thread.sleep(1000);
  testFM.underTest.setOverwriteOnConflict(true);
  testFM.underTest.processCommittedData(testFM.fileMetaDataMock);
  FileStatus fileStatus = testFM.underTest.outputFS.getFileStatus(new Path(testFM.outputDir, testFM.outputFileName));
  Assert.assertTrue(fileStatus.getModificationTime() > modTime);
}