@Test public void execute_throwsIfServiceRaisesException() throws OAuth2ServiceException { when(mockTokenService .retrieveAccessTokenViaClientCredentialsGrant(eq(TOKEN_ENDPOINT_URI), eq(clientCredentials), isNull(), anyMap(), anyBoolean())) .thenThrow(new OAuth2ServiceException("exception executed REST call")); assertThatThrownBy(() -> { cut.execute(); }).isInstanceOf(TokenFlowException.class) .hasMessageContaining( "Error requesting technical user token with grant_type 'client_credentials': exception executed REST call"); }
public OAuth2TokenResponse execute() throws IllegalArgumentException, TokenFlowException { checkRequest(request); return requestTechnicalUserToken(request); }
ClientCredentialsTokenFlow { public OAuth2TokenResponse execute() throws IllegalArgumentException, TokenFlowException { checkRequest(request); return requestTechnicalUserToken(request); } }
ClientCredentialsTokenFlow { public OAuth2TokenResponse execute() throws IllegalArgumentException, TokenFlowException { checkRequest(request); return requestTechnicalUserToken(request); } ClientCredentialsTokenFlow(OAuth2TokenService tokenService, OAuth2ServiceEndpointsProvider endpointsProvider,
			ClientCredentials clientCredentials); }
ClientCredentialsTokenFlow { public OAuth2TokenResponse execute() throws IllegalArgumentException, TokenFlowException { checkRequest(request); return requestTechnicalUserToken(request); } ClientCredentialsTokenFlow(OAuth2TokenService tokenService, OAuth2ServiceEndpointsProvider endpointsProvider,
			ClientCredentials clientCredentials); ClientCredentialsTokenFlow attributes(Map<String, String> additionalAuthorizationAttributes); ClientCredentialsTokenFlow subdomain(String subdomain); ClientCredentialsTokenFlow scopes(@Nonnull String... scopes); ClientCredentialsTokenFlow disableCache(boolean disableCache); OAuth2TokenResponse execute(); }
ClientCredentialsTokenFlow { public OAuth2TokenResponse execute() throws IllegalArgumentException, TokenFlowException { checkRequest(request); return requestTechnicalUserToken(request); } ClientCredentialsTokenFlow(OAuth2TokenService tokenService, OAuth2ServiceEndpointsProvider endpointsProvider,
			ClientCredentials clientCredentials); ClientCredentialsTokenFlow attributes(Map<String, String> additionalAuthorizationAttributes); ClientCredentialsTokenFlow subdomain(String subdomain); ClientCredentialsTokenFlow scopes(@Nonnull String... scopes); ClientCredentialsTokenFlow disableCache(boolean disableCache); OAuth2TokenResponse execute();  }