Urls { @Nullable public static String getTranscodeUrl(@NonNull HttpUrl url, @Nullable String imageKey) { if (Strings.isBlank(imageKey)) { return null; } return url.newBuilder().addPathSegment("photo") .addPathSegment(":") .addPathSegment("transcode") .addQueryParameter("url", imageKey) .build() .toString(); } private  Urls(); @NonNull static HttpUrl addPathToUrl(@NonNull HttpUrl url, @NonNull String path); @Nullable static String getTranscodeUrl(@NonNull HttpUrl url, @Nullable String imageKey); @Nullable static String addTranscodeParams(@Nullable String transcodeUrl, int width, int height);  }
@Test public void createImageTranscodeUrl() { String expected = "https: String actual = Urls.getTranscodeUrl(HttpUrl.parse("https: assertThat(actual, is(expected)); }