ApplicationHistoryClientService extends AbstractService implements
    ApplicationHistoryProtocol { @Override public GetContainersResponse getContainers(GetContainersRequest request) throws YarnException, IOException { GetContainersResponse response = GetContainersResponse.newInstance(new ArrayList<ContainerReport>( history.getContainers(request.getApplicationAttemptId()).values())); return response; } ApplicationHistoryClientService(ApplicationHistoryManager history); @Private InetSocketAddress getBindAddress(); @Override CancelDelegationTokenResponse cancelDelegationToken(
      CancelDelegationTokenRequest request); @Override GetApplicationAttemptReportResponse getApplicationAttemptReport(
      GetApplicationAttemptReportRequest request); @Override GetApplicationAttemptsResponse getApplicationAttempts(
      GetApplicationAttemptsRequest request); @Override GetApplicationReportResponse getApplicationReport(
      GetApplicationReportRequest request); @Override GetApplicationsResponse getApplications(GetApplicationsRequest request); @Override GetContainerReportResponse getContainerReport(
      GetContainerReportRequest request); @Override GetContainersResponse getContainers(GetContainersRequest request); @Override GetDelegationTokenResponse getDelegationToken(
      GetDelegationTokenRequest request); @Override RenewDelegationTokenResponse renewDelegationToken(
      RenewDelegationTokenRequest request);  }
@Test public 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(); Assert.assertNotNull(containers); Assert.assertEquals(containerId, containers.get(0).getContainerId()); Assert.assertEquals(containerId1, containers.get(1).getContainerId()); }