CDNManager { public String url(String url) { if (url.startsWith("http: if (!Strings.startsWith(url, '/')) throw new Error("url must start with '/', url=" + url); if (host == null) return url; return " }  String url(String url); void host(String host);  }
@Test void url() { assertThat(manager.url("/image/image2.png")).isEqualTo(" assertThat(manager.url("/image/image3.png")).isEqualTo(" assertThat(manager.url("/image/image3.png?param=value")).isEqualTo(" }
@Test void absoluteURL() { String absoluteURL = " assertThat(manager.url(absoluteURL)).isEqualTo(absoluteURL); }
@Test void dataURL() { String dataImageURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4 assertThat(manager.url(dataImageURL)).isEqualTo(dataImageURL); }