@Test public void testOnActivityResult() { int requestCode = 1; int resultCode = 2; Intent data = mock(Intent.class); FacebookController controller = ParseFacebookUtils.controller; ParseFacebookUtils.controller = null; ParseFacebookUtils.onActivityResult(requestCode, resultCode, data); verify(controller, never()).onActivityResult(anyInt(), anyInt(), any(Intent.class)); ParseFacebookUtils.controller = controller; ParseFacebookUtils.onActivityResult(requestCode, resultCode, data); verify(controller).onActivityResult(requestCode, resultCode, data); }
public static boolean onActivityResult(int requestCode, int resultCode, Intent data) { synchronized (lock) { if (controller != null) { return controller.onActivityResult(requestCode, resultCode, data); } return false; } }
ParseFacebookUtils { public static boolean onActivityResult(int requestCode, int resultCode, Intent data) { synchronized (lock) { if (controller != null) { return controller.onActivityResult(requestCode, resultCode, data); } return false; } } }
ParseFacebookUtils { public static boolean onActivityResult(int requestCode, int resultCode, Intent data) { synchronized (lock) { if (controller != null) { return controller.onActivityResult(requestCode, resultCode, data); } return false; } } private  ParseFacebookUtils(); }
ParseFacebookUtils { public static boolean onActivityResult(int requestCode, int resultCode, Intent data) { synchronized (lock) { if (controller != null) { return controller.onActivityResult(requestCode, resultCode, data); } return false; } } 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); }
ParseFacebookUtils { public static boolean onActivityResult(int requestCode, int resultCode, Intent data) { synchronized (lock) { if (controller != null) { return controller.onActivityResult(requestCode, resultCode, data); } return false; } } 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);  }