RestliUtils { public static String sanitizeUri(String uri) { uri = uri.toLowerCase(); if (!uri.startsWith(URI_SCHEME) && !uri.startsWith(URI_SCHEME_SSL)) { uri = URI_SCHEME + uri; } return StringUtils.appendIfMissing(uri, "/"); }  static String sanitizeUri(String uri); static Stream<T> withPaging(Stream<T> stream, final PagingContext pagingContext);  }
@Test public void testSanitizeUriValid() { String uri = "http: Assert.assertEquals(RestliUtils.sanitizeUri(uri), uri); }
@Test public void testSanitizeUriNoScheme() { String uri = "abc:1234/brooklin-service/"; Assert.assertEquals(RestliUtils.sanitizeUri(uri), "http: }
@Test public void testSanitizeUriSSL() { String uri = "https: Assert.assertEquals(RestliUtils.sanitizeUri(uri), uri); }
@Test public void testSanitizeUriNoTrailingSlash() { String uri = "http: Assert.assertEquals(RestliUtils.sanitizeUri(uri), uri + "/"); }