code: public Credential setFromTokenResponse(TokenResponse tokenResponse) {
      setAccessToken(tokenResponse.getAccessToken());
      // handle case of having a refresh token previous, but no refresh token in current
      // response
      if (tokenResponse.getRefreshToken() != null) {
        setRefreshToken(tokenResponse.getRefreshToken());
      }
      setExpiresInSeconds(tokenResponse.getExpiresInSeconds());
      return this;
    }
docs: Sets the {@link #setAccessToken access token}, {@link #setRefreshToken refresh token} (if
  available), and {@link #setExpiresInSeconds expires-in time} based on the values from the token
  response.
  
  <p>
  It does not call the refresh listeners.
  </p>
  
  <p>
  Overriding is only supported for the purpose of calling the super implementation and changing
  the return type, but nothing else.
  </p>
  
  @param tokenResponse successful token response