code: public Future<AuthenticationResult> acquireTokenByRefreshToken(
              final String refreshToken, final ClientCredential credential,
              final String resource, final AuthenticationCallback callback) {
  
          final ClientAuthentication clientAuth = new ClientSecretPost(
                  new ClientID(credential.getClientId()), new Secret(
                          credential.getClientSecret()));
          final AdalOAuthAuthorizationGrant authGrant = new AdalOAuthAuthorizationGrant(
                  new RefreshTokenGrant(new RefreshToken(refreshToken)), resource);
          return this.acquireToken(authGrant, clientAuth, callback);
      }
docs: Acquires a security token from the authority using a Refresh Token
  previously received.
  
  @param refreshToken
  Refresh Token to use in the refresh flow.
  @param credential
  The client credential used for token acquisition.
  @param resource
  Identifier of the target resource that is the recipient of the
  requested token. If null, token is requested for the same
  resource refresh token was originally issued for. If passed,
  resource should match the original resource used to acquire
  refresh token unless token service supports refresh token for
  multiple resources.
  @param callback
  optional callback object for non-blocking execution.
  @return A {@link Future} object representing the
  {@link AuthenticationResult} of the call. It contains Access
  Token, Refresh Token and the Access Token's expiration time.