### Question:
AuthorizationServiceImpl implements AuthorizationService { @Override public String resolveAuthConfirmationCodeRedirectUri(String redirectUri, String code) { if (StringUtils.isNotBlank(code)) { String paramPrefix = redirectUri.contains("?") ? "&" : "?"; return redirectUri + paramPrefix + "authConfirmationCode=" + code; } return redirectUri; }  @Override SCALoginResponseTO login(String login, String pin); @Override String resolveAuthConfirmationCodeRedirectUri(String redirectUri, String code);  }### Answer:
@Test void resolveAuthConfirmationCodeRedirectUri_no_params() { String result = service.resolveAuthConfirmationCodeRedirectUri(URI, PIN); assertThat(result).isEqualTo(URI + "?" + "authConfirmationCode=" + PIN); }
@Test void resolveAuthConfirmationCodeRedirectUri_with_param() { String result = service.resolveAuthConfirmationCodeRedirectUri(URI + "?aaa=123", PIN); assertThat(result).isEqualTo(URI + "?aaa=123" + "&" + "authConfirmationCode=" + PIN); }
@Test void resolveAuthConfirmationCodeRedirectUri_code_null_or_empty() { String result = service.resolveAuthConfirmationCodeRedirectUri(URI, null); assertThat(result).isEqualTo(URI); }