ParseSessionDataSource implements SessionDataSource { @Override public Observable<Void> signOut() { return mParseHelper.signOut() .subscribeOn(Schedulers.io()) .doOnCompleted(() -> mBroadcaster.userSignedOut()); } ParseSessionDataSource(@NonNull Broadcaster broadcaster, @NonNull ParseHelper parseHelper); @NonNull @Override Observable<BaseUser> signIn(@NonNull SessionQuery.SignIn query); @Override Observable<Void> signOut(); @NonNull @Override Observable<BaseUser> register(@NonNull SessionQuery.Register query);  }
@Test public void signOut() { when(mParseHelper.signOut()).thenReturn(Observable.empty()); TestSubscriber<Void> testSubscriber = executeTarget(mTarget.signOut()); testSubscriber.assertCompleted(); verify(mBroadcaster).userSignedOut(); }