ThirdPartyAppAnalyticsLinkServiceClient implements BackgroundResource { public final RegenerateShareableLinkIdResponse regenerateShareableLinkId( RegenerateShareableLinkIdRequest request) { return regenerateShareableLinkIdCallable().call(request); } protected  ThirdPartyAppAnalyticsLinkServiceClient(
      ThirdPartyAppAnalyticsLinkServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  ThirdPartyAppAnalyticsLinkServiceClient(ThirdPartyAppAnalyticsLinkServiceStub stub); static final ThirdPartyAppAnalyticsLinkServiceClient create(); static final ThirdPartyAppAnalyticsLinkServiceClient create(
      ThirdPartyAppAnalyticsLinkServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final ThirdPartyAppAnalyticsLinkServiceClient create(
      ThirdPartyAppAnalyticsLinkServiceStub stub); final ThirdPartyAppAnalyticsLinkServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") ThirdPartyAppAnalyticsLinkServiceStub getStub(); final ThirdPartyAppAnalyticsLink getThirdPartyAppAnalyticsLink(
      GetThirdPartyAppAnalyticsLinkRequest request); final UnaryCallable<GetThirdPartyAppAnalyticsLinkRequest, ThirdPartyAppAnalyticsLink> getThirdPartyAppAnalyticsLinkCallable(); final RegenerateShareableLinkIdResponse regenerateShareableLinkId(
      RegenerateShareableLinkIdRequest request); final UnaryCallable<RegenerateShareableLinkIdRequest, RegenerateShareableLinkIdResponse> regenerateShareableLinkIdCallable(); @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 regenerateShareableLinkIdTest() { RegenerateShareableLinkIdResponse expectedResponse = RegenerateShareableLinkIdResponse.newBuilder().build(); mockThirdPartyAppAnalyticsLinkService.addResponse(expectedResponse); RegenerateShareableLinkIdRequest request = RegenerateShareableLinkIdRequest.newBuilder().build(); RegenerateShareableLinkIdResponse actualResponse = client.regenerateShareableLinkId(request); Assert.assertEquals(expectedResponse, actualResponse); List<AbstractMessage> actualRequests = mockThirdPartyAppAnalyticsLinkService.getRequests(); Assert.assertEquals(1, actualRequests.size()); RegenerateShareableLinkIdRequest actualRequest = (RegenerateShareableLinkIdRequest) actualRequests.get(0); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }
@Test @SuppressWarnings("all") public void regenerateShareableLinkIdExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockThirdPartyAppAnalyticsLinkService.addException(exception); try { RegenerateShareableLinkIdRequest request = RegenerateShareableLinkIdRequest.newBuilder().build(); client.regenerateShareableLinkId(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { } }