ThirdPartyAppAnalyticsLinkServiceClient implements BackgroundResource { public final ThirdPartyAppAnalyticsLink getThirdPartyAppAnalyticsLink( GetThirdPartyAppAnalyticsLinkRequest request) { return getThirdPartyAppAnalyticsLinkCallable().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 getThirdPartyAppAnalyticsLinkTest() { ThirdPartyAppAnalyticsLinkName resourceName = ThirdPartyAppAnalyticsLinkName.of("[CUSTOMER]", "[THIRD_PARTY_APP_ANALYTICS_LINK]"); ThirdPartyAppAnalyticsLink expectedResponse = ThirdPartyAppAnalyticsLink.newBuilder().setResourceName(resourceName.toString()).build(); mockThirdPartyAppAnalyticsLinkService.addResponse(expectedResponse); GetThirdPartyAppAnalyticsLinkRequest request = GetThirdPartyAppAnalyticsLinkRequest.newBuilder().build(); ThirdPartyAppAnalyticsLink actualResponse = client.getThirdPartyAppAnalyticsLink(request); Assert.assertEquals(expectedResponse, actualResponse); List<AbstractMessage> actualRequests = mockThirdPartyAppAnalyticsLinkService.getRequests(); Assert.assertEquals(1, actualRequests.size()); GetThirdPartyAppAnalyticsLinkRequest actualRequest = (GetThirdPartyAppAnalyticsLinkRequest) actualRequests.get(0); Assert.assertTrue( channelProvider.isHeaderSent( ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), GaxGrpcProperties.getDefaultApiClientHeaderPattern())); }
@Test @SuppressWarnings("all") public void getThirdPartyAppAnalyticsLinkExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockThirdPartyAppAnalyticsLinkService.addException(exception); try { GetThirdPartyAppAnalyticsLinkRequest request = GetThirdPartyAppAnalyticsLinkRequest.newBuilder().build(); client.getThirdPartyAppAnalyticsLink(request); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { } }