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

  ApplicationId appId = ApplicationId.newInstance(0, 1);
  ApplicationAttemptId appAttemptId =
      ApplicationAttemptId.newInstance(appId, MAX_APPS + 1);
  GetApplicationAttemptReportRequest request =
      GetApplicationAttemptReportRequest.newInstance(appAttemptId);
  try {
    @SuppressWarnings("unused")
    GetApplicationAttemptReportResponse response =
        clientService.getApplicationAttemptReport(request);
    Assert.fail("Exception should have been thrown before we reach here.");
  } catch (ApplicationAttemptNotFoundException e) {
    //This Exception is expected
    System.out.println(e.getMessage());
    Assert.assertTrue(e.getMessage().contains(
        "doesn't exist in the timeline store"));
  } catch (Exception e) {
    Assert.fail("Undesired exception caught");
  }
}