@Test
@SuppressWarnings("all")
public void generateKeywordIdeasExceptionTest() throws Exception {

  StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
  mockKeywordPlanIdeaService.addException(exception);
  try {
    StringValue language = StringValue.newBuilder().build();
    GenerateKeywordIdeasRequest request =
        GenerateKeywordIdeasRequest.newBuilder().setLanguage(language).build();
    client.generateKeywordIdeas(request);
    Assert.fail("No exception raised");
  } catch (InvalidArgumentException e) {
    // Expected exception
  }
}