@Test @SuppressWarnings("all") public void mutateAdsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockAdService.addException(exception); try { String customerId = "customerId-1772061412"; List<AdOperation> operations = new ArrayList<>(); client.mutateAds(customerId, operations); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { } }
public final MutateAdsResponse mutateAds(String customerId, List<AdOperation> operations) { MutateAdsRequest request = MutateAdsRequest.newBuilder() .setCustomerId(customerId) .addAllOperations(operations) .build(); return mutateAds(request); }
AdServiceClient implements BackgroundResource { public final MutateAdsResponse mutateAds(String customerId, List<AdOperation> operations) { MutateAdsRequest request = MutateAdsRequest.newBuilder() .setCustomerId(customerId) .addAllOperations(operations) .build(); return mutateAds(request); } }
AdServiceClient implements BackgroundResource { public final MutateAdsResponse mutateAds(String customerId, List<AdOperation> operations) { MutateAdsRequest request = MutateAdsRequest.newBuilder() .setCustomerId(customerId) .addAllOperations(operations) .build(); return mutateAds(request); } protected  AdServiceClient(AdServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  AdServiceClient(AdServiceStub stub); }
AdServiceClient implements BackgroundResource { public final MutateAdsResponse mutateAds(String customerId, List<AdOperation> operations) { MutateAdsRequest request = MutateAdsRequest.newBuilder() .setCustomerId(customerId) .addAllOperations(operations) .build(); return mutateAds(request); } protected  AdServiceClient(AdServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  AdServiceClient(AdServiceStub stub); static final AdServiceClient create(); static final AdServiceClient create(AdServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final AdServiceClient create(AdServiceStub stub); final AdServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") AdServiceStub getStub(); final Ad getAd(AdName resourceName); final Ad getAd(String resourceName); final Ad getAd(GetAdRequest request); final UnaryCallable<GetAdRequest, Ad> getAdCallable(); final MutateAdsResponse mutateAds(String customerId, List<AdOperation> operations); final MutateAdsResponse mutateAds(MutateAdsRequest request); final UnaryCallable<MutateAdsRequest, MutateAdsResponse> mutateAdsCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit); }
AdServiceClient implements BackgroundResource { public final MutateAdsResponse mutateAds(String customerId, List<AdOperation> operations) { MutateAdsRequest request = MutateAdsRequest.newBuilder() .setCustomerId(customerId) .addAllOperations(operations) .build(); return mutateAds(request); } protected  AdServiceClient(AdServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  AdServiceClient(AdServiceStub stub); static final AdServiceClient create(); static final AdServiceClient create(AdServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final AdServiceClient create(AdServiceStub stub); final AdServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") AdServiceStub getStub(); final Ad getAd(AdName resourceName); final Ad getAd(String resourceName); final Ad getAd(GetAdRequest request); final UnaryCallable<GetAdRequest, Ad> getAdCallable(); final MutateAdsResponse mutateAds(String customerId, List<AdOperation> operations); final MutateAdsResponse mutateAds(MutateAdsRequest request); final UnaryCallable<MutateAdsRequest, MutateAdsResponse> mutateAdsCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit);  }