### Question:
CommerzbankOauth2Service 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  CommerzbankOauth2Service(Oauth2Service oauth2Service, String baseUrl); static CommerzbankOauth2Service create(Aspsp aspsp, HttpClient httpClient, Pkcs12KeyStore keyStore); @Override URI getAuthorizationRequestUri(Map<String, String> headers, Parameters parameters); @Override TokenResponse getToken(Map<String, String> headers, Parameters parameters);  }### Answer:
@Test void getAuthorizationRequestUri() throws IOException { Parameters parameters = new Parameters(); parameters.setScaOAuthLink(AUTHORIZATION_ENDPOINT); parameters.setState(STATE); parameters.setRedirectUri(REDIRECT_URI); parameters.setConsentId(CONSENT_ID); URI uri = oauth2Service.getAuthorizationRequestUri(null, parameters); assertEquals(AUTHORIZATION_ENDPOINT + "?" + "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()); }
@Test void getAuthorizationRequestUriForPayment() throws IOException { Parameters parameters = new Parameters(); parameters.setScaOAuthLink(AUTHORIZATION_ENDPOINT); parameters.setState(STATE); parameters.setRedirectUri(REDIRECT_URI); parameters.setPaymentId("payment-id"); URI uri = oauth2Service.getAuthorizationRequestUri(null, parameters); assertEquals(AUTHORIZATION_ENDPOINT + "?" + "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=PIS%3Apayment-id", uri.toString()); }