UriUtils { public static URI appendContext(URI uri, String context) { return URI.create(StringUtils.removeEnd(uri.toString(), "/") + "/" + StringUtils.removeStart(context, "/") ); } private  UriUtils(); static String extractHostFromUri(URI uri); static Integer extractPortFromUri(URI uri); static String extractAddressFromUri(URI uri); static String extractUserNameFromUri(URI uri); static String extractPasswordFromUri(URI uri); static String extractContextFromUri(URI uri); static String extractDestinationTopicFromUri(URI uri); static URI appendContext(URI uri, String context);  }
@Test public void shouldAppendContextToURI() { assertThat(appendContext(URI.create("http: .isEqualTo(URI.create("http: assertThat(appendContext(URI.create("http: .isEqualTo(URI.create("http: assertThat(appendContext(URI.create("http: .isEqualTo(URI.create("http: }