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

  StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
  mockDynamicSearchAdsSearchTermViewService.addException(exception);
  try {
    DynamicSearchAdsSearchTermViewName resourceName =
        DynamicSearchAdsSearchTermViewName.of(
            "[CUSTOMER]", "[DYNAMIC_SEARCH_ADS_SEARCH_TERM_VIEW]");
    client.getDynamicSearchAdsSearchTermView(resourceName);
    Assert.fail("No exception raised");
  } catch (InvalidArgumentException e) {
    // Expected exception
  }
}