### Question:
ParseUser extends ParseObject { Task<Void> logOutAsync() { return logOutAsync(true); } ParseUser(); static ParseQuery<ParseUser> getQuery(); boolean isAuthenticated(); @Override void remove(String key); String getSessionToken(); void setUsername(String username); String getUsername(); void setPassword(String password); void setEmail(String email); String getEmail(); boolean isNew(); @Override void put(String key, Object value); @SuppressWarnings("unchecked") @Override ParseUser fetch(); Task<Void> signUpInBackground(); void signUp(); void signUpInBackground(SignUpCallback callback); static Task<ParseUser> logInInBackground(String username, String password); static ParseUser logIn(String username, String password); static void logInInBackground(final String username, final String password,
      LogInCallback callback); static Task<ParseUser> becomeInBackground(String sessionToken); static ParseUser become(String sessionToken); static void becomeInBackground(final String sessionToken, LogInCallback callback); static ParseUser getCurrentUser(); static Task<Void> logOutInBackground(); static void logOutInBackground(LogOutCallback callback); static void logOut(); static Task<Void> requestPasswordResetInBackground(String email); static void requestPasswordReset(String email); static void requestPasswordResetInBackground(final String email,
      RequestPasswordResetCallback callback); @SuppressWarnings("unchecked") @Override ParseUser fetchIfNeeded(); static void registerAuthenticationCallback(
      String authType, AuthenticationCallback callback); static Task<ParseUser> logInWithInBackground(
      final String authType, final Map<String, String> authData); boolean isLinked(String authType); Task<Void> linkWithInBackground(
      String authType, Map<String, String> authData); Task<Void> unlinkFromInBackground(final String authType); static void enableAutomaticUser(); static Task<Void> enableRevocableSessionInBackground();  }### Answer:
@Test public void testLogOutAsync() throws Exception { NetworkSessionController sessionController = mock(NetworkSessionController.class); when(sessionController.revokeAsync(anyString())).thenReturn(Task.<Void>forResult(null)); ParseCorePlugins.getInstance().registerSessionController(sessionController); ParseAuthenticationManager manager = mock(ParseAuthenticationManager.class); when(manager.deauthenticateAsync(anyString())).thenReturn(Task.<Void>forResult(null)); ParseCorePlugins.getInstance().registerAuthenticationManager(manager); String facebookAuthType = "facebook"; Map<String, String> facebookAuthData = new HashMap<>(); facebookAuthData.put("facebookToken", "facebookTest"); ParseUser.State userState = new ParseUser.State.Builder() .objectId("test") .putAuthData(facebookAuthType, facebookAuthData) .sessionToken("r:oldSessionToken") .build(); ParseUser user = ParseObject.from(userState); ParseTaskUtils.wait(user.logOutAsync()); verify(manager).deauthenticateAsync("facebook"); verify(sessionController, times(1)).revokeAsync("r:oldSessionToken"); }