@Test public void testFetchProvidersForEmail() { when(mockFirebaseAuth.fetchProvidersForEmail("foo@bar.com")).thenReturn(mockFetchProvidersTask); when(mockProviderQueryResult.getProviders()).thenReturn(Arrays.asList("bar.com")); mockSuccessfulResultForTask(mockFetchProvidersTask, mockProviderQueryResult); when(mockFirebaseAuth.fetchProvidersForEmail("foo@bar.com")).thenReturn(mockFetchProvidersTask); TestObserver<List<String>> obs = TestObserver.create(); RxFirebaseAuth.fetchProvidersForEmail(mockFirebaseAuth, "foo@bar.com").subscribe(obs); callOnComplete(mockFetchProvidersTask); obs.dispose(); callOnComplete(mockFetchProvidersTask); obs.assertNoErrors(); obs.assertComplete(); obs.assertValue(Arrays.asList("bar.com")); }
@CheckResult @NonNull public static Maybe<List<String>> fetchProvidersForEmail( @NonNull FirebaseAuth instance, @NonNull String email) { return Maybe.create(new FetchProvidersForEmailOnSubscribe(instance, email)); }
RxFirebaseAuth { @CheckResult @NonNull public static Maybe<List<String>> fetchProvidersForEmail( @NonNull FirebaseAuth instance, @NonNull String email) { return Maybe.create(new FetchProvidersForEmailOnSubscribe(instance, email)); } }
RxFirebaseAuth { @CheckResult @NonNull public static Maybe<List<String>> fetchProvidersForEmail( @NonNull FirebaseAuth instance, @NonNull String email) { return Maybe.create(new FetchProvidersForEmailOnSubscribe(instance, email)); } private  RxFirebaseAuth(); }
RxFirebaseAuth { @CheckResult @NonNull public static Maybe<List<String>> fetchProvidersForEmail( @NonNull FirebaseAuth instance, @NonNull String email) { return Maybe.create(new FetchProvidersForEmailOnSubscribe(instance, email)); } private  RxFirebaseAuth(); @CheckResult @NonNull static Observable<FirebaseAuth> authStateChanges(
      @NonNull FirebaseAuth instance); @CheckResult @NonNull static Single<FirebaseUser> createUserWithEmailAndPassword(
      @NonNull FirebaseAuth instance, @NonNull String email, @NonNull String password); @CheckResult @NonNull static Maybe<List<String>> fetchProvidersForEmail(
      @NonNull FirebaseAuth instance, @NonNull String email); @CheckResult @NonNull static Maybe<FirebaseUser> getCurrentUser(
      @NonNull final FirebaseAuth instance); @CheckResult @NonNull static Completable sendPasswordResetEmail(
      @NonNull FirebaseAuth instance, @NonNull String email); @CheckResult @NonNull static Single<FirebaseUser> signInAnonymously(
      @NonNull FirebaseAuth instance); @CheckResult @NonNull static Single<FirebaseUser> signInWithCredential(
      @NonNull FirebaseAuth instance, @NonNull AuthCredential credential); @CheckResult @NonNull static Single<FirebaseUser> signInWithCustomToken(
      @NonNull FirebaseAuth instance, @NonNull String token); @CheckResult @NonNull static Single<FirebaseUser> signInWithEmailAndPassword(
      @NonNull FirebaseAuth instance, @NonNull String email, @NonNull String password); @CheckResult @NonNull static Completable signOut(@NonNull FirebaseAuth instance); @CheckResult @NonNull static Completable applyActionCode(@NonNull FirebaseAuth instance,
      @NonNull String code); @CheckResult @NonNull static Single<ActionCodeResult> checkActionCode(
      @NonNull FirebaseAuth instance, @NonNull String code); @CheckResult @NonNull static Completable confirmPasswordReset(
      @NonNull FirebaseAuth instance, @NonNull String code, @NonNull String newPassword); @CheckResult @NonNull static Single<String> verifyPasswordResetCode(
      @NonNull FirebaseAuth instance, @NonNull String code); }
RxFirebaseAuth { @CheckResult @NonNull public static Maybe<List<String>> fetchProvidersForEmail( @NonNull FirebaseAuth instance, @NonNull String email) { return Maybe.create(new FetchProvidersForEmailOnSubscribe(instance, email)); } private  RxFirebaseAuth(); @CheckResult @NonNull static Observable<FirebaseAuth> authStateChanges(
      @NonNull FirebaseAuth instance); @CheckResult @NonNull static Single<FirebaseUser> createUserWithEmailAndPassword(
      @NonNull FirebaseAuth instance, @NonNull String email, @NonNull String password); @CheckResult @NonNull static Maybe<List<String>> fetchProvidersForEmail(
      @NonNull FirebaseAuth instance, @NonNull String email); @CheckResult @NonNull static Maybe<FirebaseUser> getCurrentUser(
      @NonNull final FirebaseAuth instance); @CheckResult @NonNull static Completable sendPasswordResetEmail(
      @NonNull FirebaseAuth instance, @NonNull String email); @CheckResult @NonNull static Single<FirebaseUser> signInAnonymously(
      @NonNull FirebaseAuth instance); @CheckResult @NonNull static Single<FirebaseUser> signInWithCredential(
      @NonNull FirebaseAuth instance, @NonNull AuthCredential credential); @CheckResult @NonNull static Single<FirebaseUser> signInWithCustomToken(
      @NonNull FirebaseAuth instance, @NonNull String token); @CheckResult @NonNull static Single<FirebaseUser> signInWithEmailAndPassword(
      @NonNull FirebaseAuth instance, @NonNull String email, @NonNull String password); @CheckResult @NonNull static Completable signOut(@NonNull FirebaseAuth instance); @CheckResult @NonNull static Completable applyActionCode(@NonNull FirebaseAuth instance,
      @NonNull String code); @CheckResult @NonNull static Single<ActionCodeResult> checkActionCode(
      @NonNull FirebaseAuth instance, @NonNull String code); @CheckResult @NonNull static Completable confirmPasswordReset(
      @NonNull FirebaseAuth instance, @NonNull String code, @NonNull String newPassword); @CheckResult @NonNull static Single<String> verifyPasswordResetCode(
      @NonNull FirebaseAuth instance, @NonNull String code);  }