### Question:
ComdirectOauth2Service extends Oauth2ServiceDecorator implements PkceOauth2Extension { @Override public URI getAuthorizationRequestUri(Map<String, String> headers, Parameters parameters) throws IOException { requireValid(validateGetAuthorizationRequestUri(headers, parameters)); parameters.setAuthorizationEndpoint(parameters.removeScaOAuthLink()); return oauth2Service.getAuthorizationRequestUri(headers, parameters); } private  ComdirectOauth2Service(Oauth2Service oauth2Service, String baseUrl, Aspsp aspsp); static ComdirectOauth2Service create(Aspsp aspsp, HttpClient httpClient, Pkcs12KeyStore keyStore); @Override URI getAuthorizationRequestUri(Map<String, String> headers, Parameters parameters); @Override List<ValidationError> validateGetAuthorizationRequestUri(Map<String, String> headers,
                                                                    Parameters parameters); @Override TokenResponse getToken(Map<String, String> headers, Parameters parameters);  }### Answer:
@Test void getAuthorizationRequestUri() throws IOException { oauth2Service = ComdirectOauth2Service.create(new Aspsp(), null, keyStore); Parameters parameters = new Parameters(); parameters.setScaOAuthLink(SCA_OAUTH_LINK); parameters.setState(STATE); parameters.setConsentId(CONSENT_ID); parameters.setRedirectUri(REDIRECT_URI); URI uri = oauth2Service.getAuthorizationRequestUri(null, parameters); assertEquals(SCA_OAUTH_LINK + "?" + "response_type=code&" + "state=" + STATE + "&" + "redirect_uri=" + URLEncoder.encode(REDIRECT_URI, StandardCharsets.UTF_8.name()) + "&" + "client_id=" + ORG_ID + "&" + "code_challenge_method=S256&" + "code_challenge=" + oauth2Service.codeChallenge() + "&" + "scope=AIS%3A" + CONSENT_ID, uri.toString()); }