@Test public void testUpdateProfile_notSuccessful() { mockNotSuccessfulVoidResult(new IllegalStateException()); when(mockFirebaseUser.updateProfile(mockProfileChangeRequest)) .thenReturn(mockVoidTaskResult); TestObserver obs = TestObserver.create(); RxFirebaseUser.updateProfile(mockFirebaseUser, mockProfileChangeRequest) .subscribe(obs); callOnComplete(mockVoidTaskResult); obs.dispose(); obs.assertError(IllegalStateException.class); }
@CheckReturnValue @NonNull public static Completable updateProfile( @NonNull final FirebaseUser user, @NonNull final UserProfileChangeRequest request) { return RxTask.completes(new Callable<Task<Void>>() { @Override public Task<Void> call() throws Exception { return user.updateProfile(request); } }); }
RxFirebaseUser { @CheckReturnValue @NonNull public static Completable updateProfile( @NonNull final FirebaseUser user, @NonNull final UserProfileChangeRequest request) { return RxTask.completes(new Callable<Task<Void>>() { @Override public Task<Void> call() throws Exception { return user.updateProfile(request); } }); } }
RxFirebaseUser { @CheckReturnValue @NonNull public static Completable updateProfile( @NonNull final FirebaseUser user, @NonNull final UserProfileChangeRequest request) { return RxTask.completes(new Callable<Task<Void>>() { @Override public Task<Void> call() throws Exception { return user.updateProfile(request); } }); } private  RxFirebaseUser(); }
RxFirebaseUser { @CheckReturnValue @NonNull public static Completable updateProfile( @NonNull final FirebaseUser user, @NonNull final UserProfileChangeRequest request) { return RxTask.completes(new Callable<Task<Void>>() { @Override public Task<Void> call() throws Exception { return user.updateProfile(request); } }); } private  RxFirebaseUser(); @CheckReturnValue @NonNull static Completable delete(@NonNull final FirebaseUser user); @CheckReturnValue @NonNull static Single<String> getToken(@NonNull final FirebaseUser user,
                                          final boolean forceRefresh); @CheckReturnValue @NonNull static Single<FirebaseUser> linkWithCredential(
            @NonNull final FirebaseUser user, @NonNull final AuthCredential credential); @CheckReturnValue @NonNull static Completable reauthenticate(
            @NonNull final FirebaseUser user, @NonNull final AuthCredential credential); @CheckReturnValue @NonNull static Completable reload(@NonNull final FirebaseUser user); @CheckReturnValue @NonNull static Completable sendEmailVerification(@NonNull final FirebaseUser user); @CheckReturnValue @NonNull static Single<FirebaseUser> unlink(
            @NonNull final FirebaseUser user, @NonNull final String provider); @CheckReturnValue @NonNull static Completable updateEmail(
            @NonNull final FirebaseUser user, @NonNull final String email); @CheckReturnValue @NonNull static Completable updatePassword(
            @NonNull final FirebaseUser user, @NonNull final String password); @CheckReturnValue @NonNull static Completable updateProfile(
            @NonNull final FirebaseUser user, @NonNull final UserProfileChangeRequest request); }
RxFirebaseUser { @CheckReturnValue @NonNull public static Completable updateProfile( @NonNull final FirebaseUser user, @NonNull final UserProfileChangeRequest request) { return RxTask.completes(new Callable<Task<Void>>() { @Override public Task<Void> call() throws Exception { return user.updateProfile(request); } }); } private  RxFirebaseUser(); @CheckReturnValue @NonNull static Completable delete(@NonNull final FirebaseUser user); @CheckReturnValue @NonNull static Single<String> getToken(@NonNull final FirebaseUser user,
                                          final boolean forceRefresh); @CheckReturnValue @NonNull static Single<FirebaseUser> linkWithCredential(
            @NonNull final FirebaseUser user, @NonNull final AuthCredential credential); @CheckReturnValue @NonNull static Completable reauthenticate(
            @NonNull final FirebaseUser user, @NonNull final AuthCredential credential); @CheckReturnValue @NonNull static Completable reload(@NonNull final FirebaseUser user); @CheckReturnValue @NonNull static Completable sendEmailVerification(@NonNull final FirebaseUser user); @CheckReturnValue @NonNull static Single<FirebaseUser> unlink(
            @NonNull final FirebaseUser user, @NonNull final String provider); @CheckReturnValue @NonNull static Completable updateEmail(
            @NonNull final FirebaseUser user, @NonNull final String email); @CheckReturnValue @NonNull static Completable updatePassword(
            @NonNull final FirebaseUser user, @NonNull final String password); @CheckReturnValue @NonNull static Completable updateProfile(
            @NonNull final FirebaseUser user, @NonNull final UserProfileChangeRequest request);  }