@Test public void getCurrentUser() { assertNull(mFirebaseAuthProvider.getCurrentUser()); FirebaseUser user = Mockito.mock(FirebaseUser.class); when(mFirebaseAuth.getCurrentUser()).thenReturn(user); User currentUser = mFirebaseAuthProvider.getCurrentUser(); assertNotNull(currentUser); assertTrue((currentUser instanceof FirebaseSignInUser)); }
@Override @Nullable public User getCurrentUser() { if (mFirebaseAuth == null) { return null; } FirebaseUser firebaseUser = mFirebaseAuth.getCurrentUser(); if (firebaseUser == null) { return null; } return new FirebaseSignInUser(firebaseUser); }
FirebaseAuthProvider implements AuthProvider { @Override @Nullable public User getCurrentUser() { if (mFirebaseAuth == null) { return null; } FirebaseUser firebaseUser = mFirebaseAuth.getCurrentUser(); if (firebaseUser == null) { return null; } return new FirebaseSignInUser(firebaseUser); } }
FirebaseAuthProvider implements AuthProvider { @Override @Nullable public User getCurrentUser() { if (mFirebaseAuth == null) { return null; } FirebaseUser firebaseUser = mFirebaseAuth.getCurrentUser(); if (firebaseUser == null) { return null; } return new FirebaseSignInUser(firebaseUser); } FirebaseAuthProvider(
            @Nullable FirebaseAuth firebaseAuth,
            GoogleAuthProvider googleProvider); }
FirebaseAuthProvider implements AuthProvider { @Override @Nullable public User getCurrentUser() { if (mFirebaseAuth == null) { return null; } FirebaseUser firebaseUser = mFirebaseAuth.getCurrentUser(); if (firebaseUser == null) { return null; } return new FirebaseSignInUser(firebaseUser); } FirebaseAuthProvider(
            @Nullable FirebaseAuth firebaseAuth,
            GoogleAuthProvider googleProvider); @Override void onStart(); @Override void onStop(); @Override boolean isUserSignedIn(); @Override @Nullable User getCurrentUser(); @Nullable Task<GetTokenResult> getUserToken(boolean forceRefresh); @Nullable @Override Intent buildSignInIntent(); @Override Observable<FirebaseSignInUser> userFromSignInResult(int requestCode, int resultCode, Intent data); Observable<FirebaseSignInUser> signInLegacyUser(); }
FirebaseAuthProvider implements AuthProvider { @Override @Nullable public User getCurrentUser() { if (mFirebaseAuth == null) { return null; } FirebaseUser firebaseUser = mFirebaseAuth.getCurrentUser(); if (firebaseUser == null) { return null; } return new FirebaseSignInUser(firebaseUser); } FirebaseAuthProvider(
            @Nullable FirebaseAuth firebaseAuth,
            GoogleAuthProvider googleProvider); @Override void onStart(); @Override void onStop(); @Override boolean isUserSignedIn(); @Override @Nullable User getCurrentUser(); @Nullable Task<GetTokenResult> getUserToken(boolean forceRefresh); @Nullable @Override Intent buildSignInIntent(); @Override Observable<FirebaseSignInUser> userFromSignInResult(int requestCode, int resultCode, Intent data); Observable<FirebaseSignInUser> signInLegacyUser();  }