### Question:
HttpUtils { public static String appendUri(String baseUri, String path) { return appendUri(baseUri, path, false); }  static String urlEncode(final String value, final boolean path); static String urlDecode(final String value); static boolean isUsingNonDefaultPort(URI uri); static boolean usePayloadForQueryParameters(Request<?> request); static String encodeParameters(Request<?> request); static String appendUri(String baseUri, String path); static String appendUri(final String baseUri, String path,
            final boolean escapeDoubleSlash); static InputStream fetchFile(
            final URI uri,
            final ClientConfiguration config);  }### Answer:
@Test public void testAppendUriHandlesMergingSlashes() { final String baseURI = "/my/uri/"; final String path = "/path/to/add/"; final String appended = HttpUtils.appendUri(baseURI, path); assertEquals(appended, "/my/uri/path/to/add/"); }
@Test public void testAppendUriHandlesMergingWithoutSlashes() { final String baseURI = "/my/uri"; final String path = "path/to/add/"; final String appended = HttpUtils.appendUri(baseURI, path); assertEquals(appended, "/my/uri/path/to/add/"); }
@Test public void testAppendUriNoPath() { final String host = "foo.com/"; final String resourcePath = ""; Assert.assertEquals(HttpUtils.appendUri(host, resourcePath, true), "foo.com/"); }
@Test public void testAppendUriNoPathTrailingSlashAdded() { final String host = "foo.com"; final String resourcePath = ""; Assert.assertEquals(HttpUtils.appendUri(host, resourcePath, true), "foo.com/"); }
@Test public void testAppendUriTrimExtraHostTrailingSlash() { final String host = "foo.com/"; final String resourcePath = "bar"; Assert.assertEquals(HttpUtils.appendUri(host, resourcePath, true), "foo.com/bar"); }
@Test public void testAppendUriEscapeDoubleSlash() { final String host = "foo.com"; final String resourcePath = "aws Assert.assertEquals(HttpUtils.appendUri(host, resourcePath, true), "foo.com/aws/%2Fandroid/sdk"); }
@Test public void testAppendUriNoEscapeDoubleSlash() { final String host = "foo.com"; final String resourcePath = "aws Assert.assertEquals(HttpUtils.appendUri(host, resourcePath, false), "foo.com/aws }