### Question:
UrlUtils { public static boolean isValidSearchQueryUrl(String url) { String trimmedUrl = url.trim(); if (!trimmedUrl.matches("^.+?: trimmedUrl = "http: } if (!URLUtil.isNetworkUrl(trimmedUrl)) { return false; } if (!trimmedUrl.matches(".*%s$")) { return false; } return true; }  static String normalize(@NonNull String input); static boolean isUrl(String url); static boolean isValidSearchQueryUrl(String url); static boolean isHttpOrHttps(String url); static boolean isSearchQuery(String text); static String createSearchUrl(Context context, String searchTerm); static String stripUserInfo(@Nullable String url); static boolean isPermittedResourceProtocol(@Nullable final String scheme); static boolean isSupportedProtocol(@Nullable final String scheme); static boolean isInternalErrorURL(final String url); static boolean urlsMatchExceptForTrailingSlash(final @NonNull String url1, final @NonNull String url2); static String stripCommonSubdomains(@Nullable String host); static boolean isLocalizedContent(@Nullable String url);  }### Answer:
@Test public void isValidSearchQueryUrl() { assertTrue(UrlUtils.isValidSearchQueryUrl("https: assertTrue(UrlUtils.isValidSearchQueryUrl("http: assertTrue(UrlUtils.isValidSearchQueryUrl("http-test-site.com/search/?q=%s")); assertFalse(UrlUtils.isValidSearchQueryUrl("httpss: assertTrue(UrlUtils.isValidSearchQueryUrl("example.com/search/?q=%s")); assertTrue(UrlUtils.isValidSearchQueryUrl(" example.com/search/?q=%s ")); assertFalse(UrlUtils.isValidSearchQueryUrl("htps: }