### Question:
RefreshTokenFlow { public OAuth2TokenResponse execute() throws IllegalStateException, IllegalArgumentException, TokenFlowException { checkRequest(request); return refreshToken(refreshToken, request); } RefreshTokenFlow(OAuth2TokenService tokenService, OAuth2ServiceEndpointsProvider endpointsProvider,
			ClientCredentials clientCredentials); RefreshTokenFlow subdomain(String subdomain); RefreshTokenFlow refreshToken(String refreshToken); RefreshTokenFlow disableCache(boolean disableCache); OAuth2TokenResponse execute();  }### Answer:
@Test public void execute_throwsIfMandatoryFieldsNotSet() { assertThatThrownBy(() -> { cut.execute(); }).isInstanceOf(IllegalStateException.class).hasMessageContaining("Refresh token not set"); }
@Test public void execute() throws TokenFlowException, OAuth2ServiceException { OAuth2TokenResponse accessToken = mockRetrieveAccessToken(); OAuth2TokenResponse response = cut.refreshToken(REFRESH_TOKEN).execute(); assertThat(response.getAccessToken(), is(accessToken.getAccessToken())); verifyRetrieveAccessTokenCalledWith(REFRESH_TOKEN, false); }