FidoMdsMetadataItemsProvider implements MetadataItemsProvider { static String appendToken(String url, String token) { if (url == null) { throw new IllegalArgumentException("url must not be null."); } if (token == null) { return url; } try { URI uriObject = new URI(url); String query = uriObject.getQuery(); if (query == null) { query = "token=" + token; } else { query += "&" + "token=" + token; } return new URI(uriObject.getScheme(), uriObject.getAuthority(), uriObject.getPath(), query, uriObject.getFragment()).toString(); } catch (URISyntaxException e) { throw new IllegalArgumentException(String.format("Provided url %s is illegal.", url), e); } } FidoMdsMetadataItemsProvider(ObjectConverter objectConverter, String token, HttpClient httpClient, X509Certificate rootCertificate);  FidoMdsMetadataItemsProvider(ObjectConverter objectConverter, String token, HttpClient httpClient, Path path);  FidoMdsMetadataItemsProvider(ObjectConverter objectConverter, String token, HttpClient httpClient);  FidoMdsMetadataItemsProvider(ObjectConverter objectConverter, String token);  FidoMdsMetadataItemsProvider(ObjectConverter objectConverter, HttpClient httpClient, X509Certificate rootCertificate);  FidoMdsMetadataItemsProvider(ObjectConverter objectConverter, HttpClient httpClient, Path path);  FidoMdsMetadataItemsProvider(ObjectConverter objectConverter, HttpClient httpClient);  FidoMdsMetadataItemsProvider(ObjectConverter objectConverter); @Override Map<AAGUID, Set<MetadataItem>> provide(); String getFidoMetadataServiceEndpoint(); void setFidoMetadataServiceEndpoint(String fidoMetadataServiceEndpoint);  }
@Test void appendToken() { assertThat(FidoMdsMetadataItemsProvider.appendToken("https: assertThat(FidoMdsMetadataItemsProvider.appendToken("https: }