@Test
@SuppressWarnings("all")
public void listBatchJobResultsTest() {

  String nextPageToken = "";
  BatchJobResult resultsElement = BatchJobResult.newBuilder().build();
  List<BatchJobResult> results = Arrays.asList(resultsElement);
  ListBatchJobResultsResponse expectedResponse =
      ListBatchJobResultsResponse.newBuilder()
          .setNextPageToken(nextPageToken)
          .addAllResults(results)
          .build();
  mockBatchJobService.addResponse(expectedResponse);
  BatchJobName resourceName = BatchJobName.of("[CUSTOMER]", "[BATCH_JOB]");
  ListBatchJobResultsPagedResponse pagedListResponse = client.listBatchJobResults(resourceName);
  List<BatchJobResult> resources = Lists.newArrayList(pagedListResponse.iterateAll());
  Assert.assertEquals(1, resources.size());
  Assert.assertEquals(expectedResponse.getResultsList().get(0), resources.get(0));
  List<AbstractMessage> actualRequests = mockBatchJobService.getRequests();
  Assert.assertEquals(1, actualRequests.size());
  ListBatchJobResultsRequest actualRequest = (ListBatchJobResultsRequest) actualRequests.get(0);
  Assert.assertEquals(resourceName, BatchJobName.parse(actualRequest.getResourceName()));
  Assert.assertTrue(
      channelProvider.isHeaderSent(
          ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
          GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
}