@Test public void fetchRemoteFailure() { TestObserver fetchTestObserver = RxFirebaseRemote .fetch(firebaseConfig, ANY_TIME) .test(); testOnFailureListener.getValue().onFailure(EXCEPTION); verify(firebaseConfig).fetch(eq(ANY_TIME)); fetchTestObserver.assertError(EXCEPTION) .assertNotComplete() .dispose(); }
@NonNull public static Completable fetch(@NonNull final FirebaseRemoteConfig config, @NonNull final long cacheLifeTime) { return Completable.create(new CompletableOnSubscribe() { @Override public void subscribe(CompletableEmitter emitter) { RxCompletableHandler.assignOnTask(emitter, config.fetch(cacheLifeTime)); } }); }
RxFirebaseRemote { @NonNull public static Completable fetch(@NonNull final FirebaseRemoteConfig config, @NonNull final long cacheLifeTime) { return Completable.create(new CompletableOnSubscribe() { @Override public void subscribe(CompletableEmitter emitter) { RxCompletableHandler.assignOnTask(emitter, config.fetch(cacheLifeTime)); } }); } }
RxFirebaseRemote { @NonNull public static Completable fetch(@NonNull final FirebaseRemoteConfig config, @NonNull final long cacheLifeTime) { return Completable.create(new CompletableOnSubscribe() { @Override public void subscribe(CompletableEmitter emitter) { RxCompletableHandler.assignOnTask(emitter, config.fetch(cacheLifeTime)); } }); }  }
RxFirebaseRemote { @NonNull public static Completable fetch(@NonNull final FirebaseRemoteConfig config, @NonNull final long cacheLifeTime) { return Completable.create(new CompletableOnSubscribe() { @Override public void subscribe(CompletableEmitter emitter) { RxCompletableHandler.assignOnTask(emitter, config.fetch(cacheLifeTime)); } }); }  @NonNull static Completable fetch(@NonNull final FirebaseRemoteConfig config,
                                    @NonNull final long cacheLifeTime); @NonNull static Completable fetch(@NonNull final FirebaseRemoteConfig config); }
RxFirebaseRemote { @NonNull public static Completable fetch(@NonNull final FirebaseRemoteConfig config, @NonNull final long cacheLifeTime) { return Completable.create(new CompletableOnSubscribe() { @Override public void subscribe(CompletableEmitter emitter) { RxCompletableHandler.assignOnTask(emitter, config.fetch(cacheLifeTime)); } }); }  @NonNull static Completable fetch(@NonNull final FirebaseRemoteConfig config,
                                    @NonNull final long cacheLifeTime); @NonNull static Completable fetch(@NonNull final FirebaseRemoteConfig config);  }