@Override
  public GetContainersResponse getContainers(GetContainersRequest request)
      throws YarnException, IOException {
    GetContainersResponse response =
        GetContainersResponse.newInstance(new ArrayList<ContainerReport>(
          history.getContainers(request.getApplicationAttemptId()).values()));
    return response;
  }
@Test
  void testContainers() throws IOException, YarnException {
    ApplicationId appId = ApplicationId.newInstance(0, 1);
    ApplicationAttemptId appAttemptId =
        ApplicationAttemptId.newInstance(appId, 1);
    ContainerId containerId = ContainerId.newContainerId(appAttemptId, 1);
    ContainerId containerId1 = ContainerId.newContainerId(appAttemptId, 2);
    GetContainersRequest request =
        GetContainersRequest.newInstance(appAttemptId);
    GetContainersResponse response =
        clientService.getContainers(request);
    List<ContainerReport> containers = response.getContainerList();
    assertNotNull(containers);
    assertEquals(containerId, containers.get(0).getContainerId());
    assertEquals(containerId1, containers.get(1).getContainerId());
  }