### Question:
StringUri { public static boolean containsProtocol(String urlToCheck) { return urlToCheck.contains(": } 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 containsProtocol() { String uriTemplate = "%s: assertThat(StringUri.containsProtocol(String.format(uriTemplate, "https"))).isTrue(); assertThat(StringUri.containsProtocol(String.format(uriTemplate, "http"))).isTrue(); assertThat(StringUri.containsProtocol(String.format(uriTemplate, "ftp"))).isTrue(); assertThat(StringUri.containsProtocol(String.format(uriTemplate, "anyProtocol"))).isTrue(); }
@Test void containsProtocolWithoutProtocol() { String uri = "www.example.com"; assertThat(StringUri.containsProtocol(uri)).isFalse(); }