@Test
public void testFetchReportAHSDisabled() throws YarnException, IOException {

  try {
    testHelper(false);
  } catch (ApplicationNotFoundException e) {
    Assert.assertTrue(e.getMessage() == appNotFoundExceptionMsg);
    /* RM will not know of the app and Application History Service is disabled
     * So we will not try to get the report from AHS and RM will throw
     * ApplicationNotFoundException
     */
  }
  Mockito.verify(appManager, Mockito.times(1))
  .getApplicationReport(Mockito.any(GetApplicationReportRequest.class));
  if (historyManager != null) {
    Assert.fail("HistoryManager should be null as AHS is disabled");
  }
}