AuthUtils { public static URI buildAuthProviderHostUri(ServiceHost host, String serviceLink) { URI uri = host.getStateNoCloning().authProviderHostURI; URI baseUri = uri != null ? uri : host.getUri(); return UriUtils.extendUri(baseUri, serviceLink); } private  AuthUtils(); static URI buildAuthProviderHostUri(ServiceHost host, String serviceLink); static void registerUserLinkBuilder(String authnServiceLink, Function<Claims, String> userLinkBuilder); static URI buildUserUriFromClaims(ServiceHost host, Claims claims); static void setAuthDurationStat(Service service, String prefix, double value);  }
@Test public void defaultBehavior() throws Exception { Arguments args = new Arguments(); args.id = "id"; args.port = 0; args.authProviderHostUri = "http: VerificationHost customHost = new VerificationHost(); VerificationHost.initialize(customHost, args); String link = "/link-to-sth"; URI uri = AuthUtils.buildAuthProviderHostUri(customHost, link); assertEquals(URI.create(args.authProviderHostUri + link), uri); }