### Question:
BaseCredentialProvider implements CredentialProvider { protected static String callbackUrlFor(final URI baseUrl, final MultiValueMap<String, String> additionalParams) { final String path = baseUrl.getPath(); final String callbackPath = path + "credentials/callback"; try { final URI base = new URI(baseUrl.getScheme(), null, baseUrl.getHost(), baseUrl.getPort(), callbackPath, null, null); return UriComponentsBuilder.fromUri(base).queryParams(additionalParams).build().toUriString(); } catch (final URISyntaxException e) { throw new IllegalStateException("Unable to generate callback URI", e); } }    }### Answer:
@Test public void shouldGenerateCallbackUrlWithoutParameters() { assertThat(BaseCredentialProvider.callbackUrlFor(URI.create("https: .as("The computed callback URL is not as expected") .isEqualTo("https: }
@Test public void shouldGenerateCallbackUrlWithParameters() { final MultiValueMap<String, String> some = new LinkedMultiValueMap<>(); some.set("param1", "value1"); some.set("param2", "value2"); assertThat(BaseCredentialProvider.callbackUrlFor(URI.create("https: .as("The computed callback URL is not as expected") .isEqualTo("https: }