UaaUrlUtils { public static String addSubdomainToUrl(String url, String subdomain) { if (!hasText(subdomain)) { return url; } subdomain = subdomain.trim(); subdomain = subdomain.endsWith(".") ? subdomain : subdomain + "."; UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(url); builder.host(subdomain + builder.build().getHost()); return builder.build().toUriString(); }  static String getUaaUrl(String path, IdentityZone currentIdentityZone); static String getUaaUrl(String path, boolean zoneSwitchPossible, IdentityZone currentIdentityZone); static String getUaaHost(IdentityZone currentIdentityZone); static boolean isValidRegisteredRedirectUrl(String url); static boolean isValidSubdomain(String subdomain); static String findMatchingRedirectUri(Collection<String> redirectUris, String requestedRedirectUri, String fallbackRedirectUri); static String getHostForURI(String uri); static String getBaseURL(HttpServletRequest request); static Map<String, String[]> getParameterMap(String uri); static boolean isUrl(String url); static String addQueryParameter(String url, String name, String value); static String addFragmentComponent(String urlString, String component); static String addSubdomainToUrl(String url, String subdomain); static String getSubdomain(String subdomain); static String extractPathVariableFromUrl(int pathParameterIndex, String path); static String getRequestPath(HttpServletRequest request); static boolean uriHasMatchingHost(String uri, String hostname); static String normalizeUri(String uri);  }
@Test void addSubdomainToUrl_givenUaaUrl() { String url = UaaUrlUtils.addSubdomainToUrl("http: assertEquals("http: }
@Test void addSubdomainToUrl_givenUaaUrlAndSubdomain() { String url = UaaUrlUtils.addSubdomainToUrl("http: assertEquals("http: }
@Test void addSubdomainToUrl_handlesEmptySubdomain() { String url = UaaUrlUtils.addSubdomainToUrl("http: assertEquals("http: }
@Test void addSubdomainToUrl_handlesEmptySubdomain_defaultZone() { String url = UaaUrlUtils.addSubdomainToUrl("http: assertEquals("http: }
@Test void addSudomain_handlesExtraSpaceInSubdomain() { String url = UaaUrlUtils.addSubdomainToUrl("http: assertEquals("http: }
@Test void addSudomain_handlesExtraSpaceInSubdomain_currentZone() { String url2 = UaaUrlUtils.addSubdomainToUrl("http: assertEquals("http: }
@Test void addSubdomain_handlesUnexpectedDotInSubdomain() { String url = UaaUrlUtils.addSubdomainToUrl("http: assertEquals("http: }
@Test void addSubdomain_handlesUnexpectedDotInSubdomain_currentZone() { String url2 = UaaUrlUtils.addSubdomainToUrl("http: assertEquals("http: }