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

  ApplicationId appId = null;
  appId = ApplicationId.newInstance(0, 1);
  writeApplicationStartData(appId);
  writeApplicationFinishData(appId);
  ApplicationAttemptId appAttemptId =
      ApplicationAttemptId.newInstance(appId, 1);
  writeApplicationAttemptStartData(appAttemptId);
  writeApplicationAttemptFinishData(appAttemptId);
  ApplicationReport appReport =
      applicationHistoryManagerImpl.getApplication(appId);
  Assert.assertNotNull(appReport);
  Assert.assertEquals(appId, appReport.getApplicationId());
  Assert.assertEquals(appAttemptId,
    appReport.getCurrentApplicationAttemptId());
  Assert.assertEquals(appAttemptId.toString(), appReport.getHost());
  Assert.assertEquals("test type", appReport.getApplicationType().toString());
  Assert.assertEquals("test queue", appReport.getQueue().toString());
}