RemarketingActionServiceClient implements BackgroundResource { public final MutateRemarketingActionsResponse mutateRemarketingActions( String customerId, List<RemarketingActionOperation> operations) { MutateRemarketingActionsRequest request = MutateRemarketingActionsRequest.newBuilder() .setCustomerId(customerId) .addAllOperations(operations) .build(); return mutateRemarketingActions(request); } protected  RemarketingActionServiceClient(RemarketingActionServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  RemarketingActionServiceClient(RemarketingActionServiceStub stub); static final RemarketingActionServiceClient create(); static final RemarketingActionServiceClient create(
      RemarketingActionServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final RemarketingActionServiceClient create(RemarketingActionServiceStub stub); final RemarketingActionServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") RemarketingActionServiceStub getStub(); final RemarketingAction getRemarketingAction(RemarketingActionName resourceName); final RemarketingAction getRemarketingAction(String resourceName); final RemarketingAction getRemarketingAction(GetRemarketingActionRequest request); final UnaryCallable<GetRemarketingActionRequest, RemarketingAction> getRemarketingActionCallable(); final MutateRemarketingActionsResponse mutateRemarketingActions(
      String customerId, List<RemarketingActionOperation> operations); final MutateRemarketingActionsResponse mutateRemarketingActions(
      MutateRemarketingActionsRequest request); final UnaryCallable<MutateRemarketingActionsRequest, MutateRemarketingActionsResponse> mutateRemarketingActionsCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit);  }
@Test @SuppressWarnings("all") public void mutateRemarketingActionsTest() { MutateRemarketingActionsResponse expectedResponse = MutateRemarketingActionsResponse.newBuilder().build(); mockRemarketingActionService.addResponse(expectedResponse); String customerId = "customerId-1772061412"; List<RemarketingActionOperation> operations = new ArrayList<>(); MutateRemarketingActionsResponse actualResponse = client.mutateRemarketingActions(customerId, operations); Assert.assertEquals(expectedResponse, actualResponse); List<AbstractMessage> actualRequests = mockRemarketingActionService.getRequests(); Assert.assertEquals(1, actualRequests.size()); MutateRemarketingActionsRequest actualRequest = (MutateRemarketingActionsRequest) actualRequests.get(0); Assert.assertEquals(customerId, actualRequest.getCustomerId()); Assert.assertEquals(operations, actualRequest.getOperationsList()); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }
@Test @SuppressWarnings("all") public void mutateRemarketingActionsExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockRemarketingActionService.addException(exception); try { String customerId = "customerId-1772061412"; List<RemarketingActionOperation> operations = new ArrayList<>(); client.mutateRemarketingActions(customerId, operations); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { } }