@Test
public void testParseMetadataFailIOException() throws IOException {

  Path jobFolder = new Path(Constants.TONY_CORE_SRC + "test/resources/typicalHistFolder/job1");
  String jobRegex = "application\\d+";
  FileSystem mockFs = mock(FileSystem.class);
  when(mockFs.listStatus(jobFolder)).thenThrow(new IOException("IO Excpt"));
  JobMetadata result = ParserUtils.parseMetadata(mockFs, yarnConf, jobFolder, jobRegex);
  assertNull(result);
}