### Question:
StringUri { public static Optional<String> getVersion(String uri) { Matcher matcher = VERSION_PATTERN.matcher(uri); if (matcher.find()) { return Optional.of(matcher.group(0)); } return Optional.empty(); } private  StringUri(); static String fromElements(Object... elements); static String withQuery(String uri, Map<String, ?> requestParams); static String withQuery(String uri, String paramName, String paramValue); static Map<String, String> getQueryParamsFromUri(String uri); static String decode(String url); static boolean isUri(String stringToCheck); static boolean containsProtocol(String urlToCheck); static boolean containsQueryParam(String uri, String paramName); static String appendQueryParam(String uri, String paramName, String paramValue); static String removeAllQueryParams(String uri); static Optional<String> getVersion(String uri); static String copyQueryParams(String sourceUri, String targetUri);  }### Answer:
@Test void getVersion() { String uri1 = "http: assertThat(StringUri.getVersion(uri1)).contains("v1"); String uri2 = "http: assertThat(StringUri.getVersion(uri2)).contains("v1"); String uri3 = "http: assertThat(StringUri.getVersion(uri3)).isEmpty(); String uri4 = "http: assertThat(StringUri.getVersion(uri4)).isEmpty(); }