@Test public void testClear() throws Exception { when(cache1.clear()).thenReturn(Observable.just(true)); when(cache2.clear()).thenReturn(Observable.just(true)); ObservableTestUtils.testObservable(waterfallCache.clear(), Assert::assertTrue); verify(cache1).clear(); verify(cache2).clear(); }
@Override public Observable<Boolean> clear() { if (memoryCache != null) { memoryCache.evictAll(); } return doOnAll(RxCache::clear); }
WaterfallCache implements Cache { @Override public Observable<Boolean> clear() { if (memoryCache != null) { memoryCache.evictAll(); } return doOnAll(RxCache::clear); } }
WaterfallCache implements Cache { @Override public Observable<Boolean> clear() { if (memoryCache != null) { memoryCache.evictAll(); } return doOnAll(RxCache::clear); } private  WaterfallCache(List<RxCache> caches, Scheduler observeOnScheduler, int inlineMemoryCacheSize); }
WaterfallCache implements Cache { @Override public Observable<Boolean> clear() { if (memoryCache != null) { memoryCache.evictAll(); } return doOnAll(RxCache::clear); } private  WaterfallCache(List<RxCache> caches, Scheduler observeOnScheduler, int inlineMemoryCacheSize); @Override Observable<T> get(final String key, final Type typeOfT); @Override Observable<Boolean> put(final String key, final Object object); @Override Observable<Boolean> contains(final String key); @Override Observable<Boolean> remove(final String key); @Override Observable<Boolean> clear(); @Override void getAsync(String key, Type typeOfT, WaterfallGetCallback<T> callback); @Override void putAsync(String key, Object object, WaterfallCallback callback); @Override void containsAsync(String key, WaterfallGetCallback<Boolean> callback); @Override void removeAsync(String key, WaterfallCallback callback); @Override void clearAsync(WaterfallCallback callback); void setObserveOnScheduler(Scheduler scheduler); static Builder builder(); }
WaterfallCache implements Cache { @Override public Observable<Boolean> clear() { if (memoryCache != null) { memoryCache.evictAll(); } return doOnAll(RxCache::clear); } private  WaterfallCache(List<RxCache> caches, Scheduler observeOnScheduler, int inlineMemoryCacheSize); @Override Observable<T> get(final String key, final Type typeOfT); @Override Observable<Boolean> put(final String key, final Object object); @Override Observable<Boolean> contains(final String key); @Override Observable<Boolean> remove(final String key); @Override Observable<Boolean> clear(); @Override void getAsync(String key, Type typeOfT, WaterfallGetCallback<T> callback); @Override void putAsync(String key, Object object, WaterfallCallback callback); @Override void containsAsync(String key, WaterfallGetCallback<Boolean> callback); @Override void removeAsync(String key, WaterfallCallback callback); @Override void clearAsync(WaterfallCallback callback); void setObserveOnScheduler(Scheduler scheduler); static Builder builder();  }