@Test
public void testDirectory() throws IOException
{

  when(testFM.fileMetaDataMock.getFileName()).thenReturn(dummyDir);
  when(testFM.fileMetaDataMock.getRelativePath()).thenReturn(dummyDir);
  when(testFM.fileMetaDataMock.getStitchedFileRelativePath()).thenReturn(dummyDir);
  when(testFM.fileMetaDataMock.isDirectory()).thenReturn(true); // is a directory
  when(testFM.fileMetaDataMock.getNumberOfBlocks()).thenReturn(0);
  when(testFM.fileMetaDataMock.getBlockIds()).thenReturn(new long[] {});
  testFM.underTest.mergeOutputFile(testFM.fileMetaDataMock);
  File statsFile = new File(testFM.outputDir, dummyDir);
  Assert.assertTrue(statsFile.exists() && statsFile.isDirectory());
}