@Test public void getFiams_constructsCampaignsRequestWithProjectNumberFromGcmSenderId() { when(mockGrpcClient.fetchEligibleCampaigns(fetchEligibleCampaignsRequestArgcaptor.capture())) .thenReturn(testFetchEligibleCampaignsResponse); apiClient.getFiams(FID_RESULT, campaignImpressionList); assertThat(fetchEligibleCampaignsRequestArgcaptor.getValue().getProjectNumber()) .isEqualTo(TEST_PROJECT_NUMBER); }
FetchEligibleCampaignsResponse getFiams( InstallationIdResult installationIdResult, CampaignImpressionList impressionList) { Logging.logi(FETCHING_CAMPAIGN_MESSAGE); providerInstaller.install(); return withCacheExpirationSafeguards( grpcClient .get() .fetchEligibleCampaigns( FetchEligibleCampaignsRequest.newBuilder() .setProjectNumber(firebaseApp.getOptions().getGcmSenderId()) .addAllAlreadySeenCampaigns(impressionList.getAlreadySeenCampaignsList()) .setClientSignals(getClientSignals()) .setRequestingClientApp(getClientAppInfo(installationIdResult)) .build())); }
ApiClient { FetchEligibleCampaignsResponse getFiams( InstallationIdResult installationIdResult, CampaignImpressionList impressionList) { Logging.logi(FETCHING_CAMPAIGN_MESSAGE); providerInstaller.install(); return withCacheExpirationSafeguards( grpcClient .get() .fetchEligibleCampaigns( FetchEligibleCampaignsRequest.newBuilder() .setProjectNumber(firebaseApp.getOptions().getGcmSenderId()) .addAllAlreadySeenCampaigns(impressionList.getAlreadySeenCampaignsList()) .setClientSignals(getClientSignals()) .setRequestingClientApp(getClientAppInfo(installationIdResult)) .build())); } }
ApiClient { FetchEligibleCampaignsResponse getFiams( InstallationIdResult installationIdResult, CampaignImpressionList impressionList) { Logging.logi(FETCHING_CAMPAIGN_MESSAGE); providerInstaller.install(); return withCacheExpirationSafeguards( grpcClient .get() .fetchEligibleCampaigns( FetchEligibleCampaignsRequest.newBuilder() .setProjectNumber(firebaseApp.getOptions().getGcmSenderId()) .addAllAlreadySeenCampaigns(impressionList.getAlreadySeenCampaignsList()) .setClientSignals(getClientSignals()) .setRequestingClientApp(getClientAppInfo(installationIdResult)) .build())); } ApiClient(
      Lazy<GrpcClient> grpcClient,
      FirebaseApp firebaseApp,
      Application application,
      Clock clock,
      ProviderInstaller providerInstaller); }
ApiClient { FetchEligibleCampaignsResponse getFiams( InstallationIdResult installationIdResult, CampaignImpressionList impressionList) { Logging.logi(FETCHING_CAMPAIGN_MESSAGE); providerInstaller.install(); return withCacheExpirationSafeguards( grpcClient .get() .fetchEligibleCampaigns( FetchEligibleCampaignsRequest.newBuilder() .setProjectNumber(firebaseApp.getOptions().getGcmSenderId()) .addAllAlreadySeenCampaigns(impressionList.getAlreadySeenCampaignsList()) .setClientSignals(getClientSignals()) .setRequestingClientApp(getClientAppInfo(installationIdResult)) .build())); } ApiClient(
      Lazy<GrpcClient> grpcClient,
      FirebaseApp firebaseApp,
      Application application,
      Clock clock,
      ProviderInstaller providerInstaller);  }
ApiClient { FetchEligibleCampaignsResponse getFiams( InstallationIdResult installationIdResult, CampaignImpressionList impressionList) { Logging.logi(FETCHING_CAMPAIGN_MESSAGE); providerInstaller.install(); return withCacheExpirationSafeguards( grpcClient .get() .fetchEligibleCampaigns( FetchEligibleCampaignsRequest.newBuilder() .setProjectNumber(firebaseApp.getOptions().getGcmSenderId()) .addAllAlreadySeenCampaigns(impressionList.getAlreadySeenCampaignsList()) .setClientSignals(getClientSignals()) .setRequestingClientApp(getClientAppInfo(installationIdResult)) .build())); } ApiClient(
      Lazy<GrpcClient> grpcClient,
      FirebaseApp firebaseApp,
      Application application,
      Clock clock,
      ProviderInstaller providerInstaller);   }