@Test
public void testGetJobFoldersHandlesIOException() throws IOException {

  Path histFolder = new Path(Constants.TONY_CORE_SRC + "test/resources/typicalHistFolder");
  FileSystem mockFs = mock(FileSystem.class);
  String regex = "job*";
  when(mockFs.listStatus(histFolder)).thenThrow(new IOException("IO Excpt"));
  assertNull(HdfsUtils.getJobDirPath(mockFs, histFolder, regex));
}