RxLogin { public void registerCallback(final FacebookCallback<LoginResult> callback) { mCallbackManager = CallbackManager.Factory.create(); mFacebookCallback = callback; mFbManager.registerCallback(mCallbackManager, mFacebookCallback); }  Flowable<LoginResult> loginFacebook(Activity activity, boolean publish,
        List<String> permissions); Flowable<GoogleSignInResult> loginGoogle(Activity activity, @NonNull Scope scope,
        Scope... scopes); Flowable<GoogleSignInResult> loginGoogle(Activity activity, @NonNull String
        webClientId, @NonNull Scope scope, Scope... scopes); Flowable<Result<TwitterSession>> loginTwitter(Activity activity); void registerCallback(final FacebookCallback<LoginResult> callback); void registerCallback(GoogleCallback callback); void registerCallback(Callback<TwitterSession> callback); boolean onActivityResult(int requestCode, int resultCode, Intent data);  }
@Test public void testRegisterCallbackForFacebook() { mRxLogin.mFbManager = mock(com.facebook.login.LoginManager.class); FacebookCallback callback = mock(FacebookCallback.class); mRxLogin.registerCallback(callback); verify(mRxLogin.mFbManager).registerCallback(any(com.facebook.CallbackManager.class), eq(callback)); assertThat(mRxLogin.mFacebookCallback).isEqualTo(callback); assertThat(mRxLogin.mCallbackManager).isNotNull(); }
@Test public void testRegisterCallbackForGoogle() { GoogleCallback callback = mock(GoogleCallback.class); mRxLogin.registerCallback(callback); assertThat(mRxLogin.mGoogleCallback).isEqualTo(callback); }