@Override
  public GetApplicationReportResponse getApplicationReport(
      GetApplicationReportRequest request) throws YarnException, IOException {
    ApplicationId applicationId = request.getApplicationId();
    try {
      GetApplicationReportResponse response =
          GetApplicationReportResponse.newInstance(history
            .getApplication(applicationId));
      return response;
    } catch (IOException e) {
      LOG.error(e.getMessage(), e);
      throw e;
    }
  }
@Test
  void testApplicationReport() throws IOException, YarnException {
    ApplicationId appId = null;
    appId = ApplicationId.newInstance(0, 1);
    GetApplicationReportRequest request =
        GetApplicationReportRequest.newInstance(appId);
    GetApplicationReportResponse response =
        clientService.getApplicationReport(request);
    ApplicationReport appReport = response.getApplicationReport();
    assertNotNull(appReport);
    assertEquals(123, appReport.getApplicationResourceUsageReport()
        .getMemorySeconds());
    assertEquals(345, appReport.getApplicationResourceUsageReport()
        .getVcoreSeconds());
    assertEquals("application_0_0001", appReport.getApplicationId()
        .toString());
    assertEquals("test app type",
        appReport.getApplicationType().toString());
    assertEquals("test queue", appReport.getQueue().toString());
  }