@Test
public void testGetApplicationReportWithNotAttempt() throws Exception {

  final ApplicationId appId = ApplicationId.newInstance(0, SCALE + 1);
  ApplicationReport app;
  if (callerUGI == null) {
    app = historyManager.getApplication(appId);
  } else {
    app =
        callerUGI.doAs(new PrivilegedExceptionAction<ApplicationReport> () {
          @Override
          public ApplicationReport run() throws Exception {
            return historyManager.getApplication(appId);
          }
        });
  }
  Assert.assertNotNull(app);
  Assert.assertEquals(appId, app.getApplicationId());
  Assert.assertEquals(ApplicationAttemptId.newInstance(appId, -1),
      app.getCurrentApplicationAttemptId());
}