ParseFacebookUtils { public static boolean isLinked(ParseUser user) { return user.isLinked(AUTH_TYPE); } private  ParseFacebookUtils(); static boolean isLinked(ParseUser user); static void initialize(Context context); static void initialize(Context context, int callbackRequestCodeOffset); static boolean onActivityResult(int requestCode, int resultCode, Intent data); static Task<ParseUser> logInInBackground(AccessToken accessToken); static Task<ParseUser> logInInBackground(AccessToken accessToken, LogInCallback callback); static Task<ParseUser> logInWithReadPermissionsInBackground(Activity activity,
                                                                       Collection<String> permissions); static Task<ParseUser> logInWithReadPermissionsInBackground(Activity activity,
                                                                       Collection<String> permissions, LogInCallback callback); static Task<ParseUser> logInWithPublishPermissionsInBackground(Activity activity,
                                                                          Collection<String> permissions); static Task<ParseUser> logInWithPublishPermissionsInBackground(Activity activity,
                                                                          Collection<String> permissions, LogInCallback callback); static Task<ParseUser> logInWithReadPermissionsInBackground(Fragment fragment,
                                                                       Collection<String> permissions); static Task<ParseUser> logInWithReadPermissionsInBackground(Fragment fragment,
                                                                       Collection<String> permissions, LogInCallback callback); static Task<ParseUser> logInWithPublishPermissionsInBackground(Fragment fragment,
                                                                          Collection<String> permissions); static Task<ParseUser> logInWithPublishPermissionsInBackground(Fragment fragment,
                                                                          Collection<String> permissions, LogInCallback callback); static Task<Void> linkInBackground(ParseUser user, AccessToken accessToken); static Task<Void> linkInBackground(ParseUser user, AccessToken accessToken,
                                              SaveCallback callback); static Task<Void> linkWithReadPermissionsInBackground(ParseUser user,
                                                                 Activity activity, Collection<String> permissions); static Task<Void> linkWithReadPermissionsInBackground(ParseUser user,
                                                                 Activity activity, Collection<String> permissions, SaveCallback callback); static Task<Void> linkWithPublishPermissionsInBackground(ParseUser user,
                                                                    Activity activity, Collection<String> permissions); static Task<Void> linkWithPublishPermissionsInBackground(ParseUser user,
                                                                    Activity activity, Collection<String> permissions, SaveCallback callback); static Task<Void> linkWithReadPermissionsInBackground(ParseUser user,
                                                                 Fragment fragment, Collection<String> permissions); static Task<Void> linkWithReadPermissionsInBackground(ParseUser user,
                                                                 Fragment fragment, Collection<String> permissions, SaveCallback callback); static Task<Void> linkWithPublishPermissionsInBackground(ParseUser user,
                                                                    Fragment fragment, Collection<String> permissions); static Task<Void> linkWithPublishPermissionsInBackground(ParseUser user,
                                                                    Fragment fragment, Collection<String> permissions, SaveCallback callback); static Task<Void> unlinkInBackground(ParseUser user); static Task<Void> unlinkInBackground(ParseUser user, SaveCallback callback);  }
@Test public void testIsLinked() { ParseUser user = mock(ParseUser.class); when(user.isLinked(anyString())).thenReturn(true); assertTrue(ParseFacebookUtils.isLinked(user)); verify(user).isLinked("facebook"); }