@Test public void put_noErrors_writesToStorage() { when(storageClient.write(fetchEligibleCampaignsResponse2)).thenReturn(fakeWrite); campaignCacheClient.put(fetchEligibleCampaignsResponse2).subscribe(); assertThat(wasWritten).isTrue(); }
public Completable put(FetchEligibleCampaignsResponse fetchEligibleCampaignsResponse) { return storageClient .write(fetchEligibleCampaignsResponse) .doOnComplete(() -> cachedResponse = fetchEligibleCampaignsResponse); }
CampaignCacheClient { public Completable put(FetchEligibleCampaignsResponse fetchEligibleCampaignsResponse) { return storageClient .write(fetchEligibleCampaignsResponse) .doOnComplete(() -> cachedResponse = fetchEligibleCampaignsResponse); } }
CampaignCacheClient { public Completable put(FetchEligibleCampaignsResponse fetchEligibleCampaignsResponse) { return storageClient .write(fetchEligibleCampaignsResponse) .doOnComplete(() -> cachedResponse = fetchEligibleCampaignsResponse); } @Inject  CampaignCacheClient(
      @CampaignCache ProtoStorageClient storageClient, Application application, Clock clock); }
CampaignCacheClient { public Completable put(FetchEligibleCampaignsResponse fetchEligibleCampaignsResponse) { return storageClient .write(fetchEligibleCampaignsResponse) .doOnComplete(() -> cachedResponse = fetchEligibleCampaignsResponse); } @Inject  CampaignCacheClient(
      @CampaignCache ProtoStorageClient storageClient, Application application, Clock clock); Completable put(FetchEligibleCampaignsResponse fetchEligibleCampaignsResponse); Maybe<FetchEligibleCampaignsResponse> get(); }
CampaignCacheClient { public Completable put(FetchEligibleCampaignsResponse fetchEligibleCampaignsResponse) { return storageClient .write(fetchEligibleCampaignsResponse) .doOnComplete(() -> cachedResponse = fetchEligibleCampaignsResponse); } @Inject  CampaignCacheClient(
      @CampaignCache ProtoStorageClient storageClient, Application application, Clock clock); Completable put(FetchEligibleCampaignsResponse fetchEligibleCampaignsResponse); Maybe<FetchEligibleCampaignsResponse> get();  }