FileMerger extends FileStitcher<OutputFileMetadata> { @Override protected OutputStream writeTempOutputFile(OutputFileMetadata outputFileMetadata) throws IOException, BlockNotFoundException { OutputStream outputStream = super.writeTempOutputFile(outputFileMetadata); bytesWritten += outputFileMetadata.getFileLength(); return outputStream; }  @Override void beginWindow(long windowId); boolean isOverwriteOnConflict(); void setOverwriteOnConflict(boolean overwriteOnConflict);  }
@Test(expected = BlockNotFoundException.class) public void testMissingBlock() throws IOException, BlockNotFoundException { FileUtils.deleteQuietly(testFM.blockFiles[2]); testFM.underTest.tempOutFilePath = new Path(testFM.baseDir, testFM.fileMetaDataMock.getStitchedFileRelativePath() + '.' + System.currentTimeMillis() + FileStitcher.PART_FILE_EXTENTION); testFM.underTest.writeTempOutputFile(testFM.fileMetaDataMock); fail("Failed when one block missing."); }