### Question:
OAuthClientUtils { public static URI getAuthorizationURI(String authorizationServiceURI, String clientId, String redirectUri, String state, String scope) { UriBuilder ub = getAuthorizationURIBuilder(authorizationServiceURI, clientId, redirectUri, state, scope); return ub.build(); } private  OAuthClientUtils(); static URI getAuthorizationURI(String authorizationServiceURI,
                                          String clientId,
                                          String redirectUri,
                                          String state,
                                          String scope); static UriBuilder getAuthorizationURIBuilder(String authorizationServiceURI,
                                          String clientId,
                                          String redirectUri,
                                          String state,
                                          String scope); static UriBuilder getAuthorizationURIBuilder(String authorizationServiceURI,
                                                 String clientId,
                                                 String scope); static ClientAccessToken getAccessToken(WebClient accessTokenService,
                                                   Consumer consumer,
                                                   AccessTokenGrant grant); static ClientAccessToken getAccessToken(String accessTokenServiceUri,
                                                   Consumer consumer,
                                                   AccessTokenGrant grant,
                                                   boolean setAuthorizationHeader); static ClientAccessToken getAccessToken(WebClient accessTokenService,
                                                   Consumer consumer,
                                                   AccessTokenGrant grant,
                                                   boolean setAuthorizationHeader); static ClientAccessToken getAccessToken(WebClient accessTokenService,
                                                   AccessTokenGrant grant); static ClientAccessToken getAccessToken(WebClient accessTokenService,
                                                   AccessTokenGrant grant,
                                                   Map<String, String> extraParams); static ClientAccessToken getAccessToken(WebClient accessTokenService,
                                                   Consumer consumer,
                                                   AccessTokenGrant grant,
                                                   Map<String, String> extraParams,
                                                   boolean setAuthorizationHeader); static ClientAccessToken refreshAccessToken(WebClient accessTokenService,
                                                       ClientAccessToken at); static ClientAccessToken refreshAccessToken(WebClient accessTokenService,
                                                       Consumer consumer,
                                                       ClientAccessToken at); static ClientAccessToken refreshAccessToken(WebClient accessTokenService,
                                                       Consumer consumer,
                                                       ClientAccessToken at,
                                                       String scope,
                                                       boolean setAuthorizationHeader); static ClientAccessToken getAccessToken(WebClient accessTokenService,
                                                   Consumer consumer,
                                                   AccessTokenGrant grant,
                                                   Map<String, String> extraParams,
                                                   String defaultTokenType,
                                                   boolean setAuthorizationHeader); static ClientAccessToken fromMapToClientToken(Map<String, String> map); static ClientAccessToken fromMapToClientToken(Map<String, String> map,
                                                         String defaultTokenType); static String createAuthorizationHeader(ClientAccessToken accessToken); static String createAuthorizationHeader(ClientAccessToken accessToken,
                                                   HttpRequestProperties httpProps); static void setAuthorizationHeader(WebClient wc, ClientAccessToken accessToken); static void setAuthorizationHeader(WebClient wc,
                                              ClientAccessToken accessToken,
                                              String httpVerb); static AuthorizationMetadata getAuthorizationMetadata(String issuerURL);  }### Answer:
@Test public void getAuthorizationURI() { String authorizationServiceURI = "https: String clientId = "clientId"; String redirectUri = "https: String state = "unique"; String scope = OAuthConstants.REFRESH_TOKEN_SCOPE; URI uri = OAuthClientUtils.getAuthorizationURI(authorizationServiceURI, clientId, redirectUri, state, scope); assertTrue(uri.toString().startsWith(authorizationServiceURI)); Map<String, String> query = Arrays.asList(uri.getQuery().split("&")).stream().map(s -> s.split("=")) .collect(Collectors.toMap(a -> a[0], a -> a.length > 1 ? a[1] : "")); assertEquals(clientId, query.get(OAuthConstants.CLIENT_ID)); assertEquals(redirectUri, query.get(OAuthConstants.REDIRECT_URI)); assertEquals(state, query.get(OAuthConstants.STATE)); assertEquals(OAuthConstants.CODE_RESPONSE_TYPE, query.get(OAuthConstants.RESPONSE_TYPE)); }