LoginManager { public boolean isAuthenticated() { return (sessionConfiguration.getServerToken() != null || accessTokenStorage.getAccessToken() != null); } LoginManager(
            @NonNull AccessTokenStorage accessTokenStorage,
            @NonNull LoginCallback loginCallback);  LoginManager(
            @NonNull AccessTokenStorage accessTokenStorage,
            @NonNull LoginCallback loginCallback,
            @NonNull SessionConfiguration configuration);  LoginManager(
            @NonNull AccessTokenStorage accessTokenStorage,
            @NonNull LoginCallback loginCallback,
            @NonNull SessionConfiguration configuration,
            int requestCode);   LoginManager(
            @NonNull AccessTokenStorage accessTokenStorage,
            @NonNull LoginCallback loginCallback,
            @NonNull SessionConfiguration configuration,
            int requestCode,
            @NonNull LegacyUriRedirectHandler legacyUriRedirectHandler); void login(final @NonNull Activity activity); @Deprecated void loginForImplicitGrant(@NonNull Activity activity); void loginForAuthorizationCode(@NonNull Activity activity); @Deprecated @NonNull @SuppressWarnings("unchecked") T getAccessTokenManager(); @NonNull AccessTokenStorage getAccessTokenStorage(); LoginCallback getLoginCallback(); @NonNull SessionConfiguration getSessionConfiguration(); @NonNull Session<?> getSession(); boolean isAuthenticated(); @Deprecated LoginManager setRedirectForAuthorizationCode(boolean redirectForAuthorizationCode); @Deprecated boolean isRedirectForAuthorizationCode(); LoginManager setAuthCodeFlowEnabled(boolean authCodeFlowEnabled); LoginManager setProductFlowPriority(@NonNull Collection<SupportedAppType> productFlowPriority); boolean isAuthCodeFlowEnabled(); void onActivityResult(
            @NonNull Activity activity,
            int requestCode,
            int resultCode,
            @Nullable Intent data);  }
@Test public void isAuthenticated_withServerToken_true() { when(accessTokenStorage.getAccessToken()).thenReturn(null); loginManager = new LoginManager(accessTokenStorage, callback, sessionConfiguration .newBuilder().setServerToken("serverToken").build()); assertTrue(loginManager.isAuthenticated()); }
@Test public void isAuthenticated_withAccessToken_true() { when(accessTokenStorage.getAccessToken()).thenReturn(ACCESS_TOKEN); assertTrue(loginManager.isAuthenticated()); }
@Test public void isAuthenticated_withoutAccessOrServerToken_false() { when(accessTokenStorage.getAccessToken()).thenReturn(null); assertFalse(loginManager.isAuthenticated()); }