private ApplicationReport verifyAppReportAfterRMRestart(RMApp app, MockRM rm)
throws Exception {
GetApplicationReportRequest reportRequest =
GetApplicationReportRequest.newInstance(app.getApplicationId());
GetApplicationReportResponse response =
rm.getClientRMService().getApplicationReport(reportRequest);
ApplicationReport report = response.getApplicationReport();
Assert.assertEquals(app.getStartTime(), report.getStartTime());
Assert.assertEquals(app.getFinishTime(), report.getFinishTime());
Assert.assertEquals(app.createApplicationState(),
report.getYarnApplicationState());
Assert.assertTrue(1 == report.getProgress());
return response.getApplicationReport();
}