@Override
  public GetContainerReportResponse getContainerReport(
      GetContainerReportRequest request) throws YarnException, IOException {
    ContainerId containerId = request.getContainerId();
    try {
      GetContainerReportResponse response =
          GetContainerReportResponse.newInstance(history
            .getContainer(containerId));
      return response;
    } catch (IOException e) {
      LOG.error(e.getMessage(), e);
      throw e;
    }
  }
@Test
  void testContainerNotFound() throws IOException, YarnException {
    ApplicationId appId = ApplicationId.newInstance(0, 1);
    ApplicationAttemptId appAttemptId =
        ApplicationAttemptId.newInstance(appId, 1);
    ContainerId containerId = ContainerId.newContainerId(appAttemptId,
        MAX_APPS + 1);
    GetContainerReportRequest request =
        GetContainerReportRequest.newInstance(containerId);
    try {
      @SuppressWarnings("unused")
      GetContainerReportResponse response =
          clientService.getContainerReport(request);
    } catch (ContainerNotFoundException e) {
      //This exception is expected
      assertTrue(e.getMessage().contains(
          "doesn't exist in the timeline store"));
    }  catch (Exception e) {
      fail("Undesired exception caught");
    }
  }