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

  String nextPageToken = "";
  long totalSize = 705419236L;
  GenerateKeywordIdeaResult resultsElement = GenerateKeywordIdeaResult.newBuilder().build();
  List<GenerateKeywordIdeaResult> results = Arrays.asList(resultsElement);
  GenerateKeywordIdeaResponse expectedResponse =
      GenerateKeywordIdeaResponse.newBuilder()
          .setNextPageToken(nextPageToken)
          .setTotalSize(totalSize)
          .addAllResults(results)
          .build();
  mockKeywordPlanIdeaService.addResponse(expectedResponse);
  StringValue language = StringValue.newBuilder().build();
  GenerateKeywordIdeasRequest request =
      GenerateKeywordIdeasRequest.newBuilder().setLanguage(language).build();
  GenerateKeywordIdeasPagedResponse pagedListResponse = client.generateKeywordIdeas(request);
  List<GenerateKeywordIdeaResult> resources = Lists.newArrayList(pagedListResponse.iterateAll());
  Assert.assertEquals(1, resources.size());
  Assert.assertEquals(expectedResponse.getResultsList().get(0), resources.get(0));
  List<AbstractMessage> actualRequests = mockKeywordPlanIdeaService.getRequests();
  Assert.assertEquals(1, actualRequests.size());
  GenerateKeywordIdeasRequest actualRequest = (GenerateKeywordIdeasRequest) actualRequests.get(0);
  Assert.assertEquals(language, actualRequest.getLanguage());
  Assert.assertTrue(
      channelProvider.isHeaderSent(
          ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
          GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
}