### Question:
UrlUtils { public static String stripUserInfo(@Nullable String url) { if (TextUtils.isEmpty(url)) { return ""; } try { URI uri = new URI(url); final String userInfo = uri.getUserInfo(); if (userInfo == null) { return url; } uri = new URI(uri.getScheme(), null, uri.getHost(), uri.getPort(), uri.getPath(), uri.getQuery(), uri.getFragment()); return uri.toString(); } catch (URISyntaxException e) { return url; } }  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 @SuppressLint("AuthLeak") public void testStripUserInfo() { assertEquals("", UrlUtils.stripUserInfo(null)); assertEquals("", UrlUtils.stripUserInfo("")); assertEquals("https: assertEquals("https: assertEquals("user@mozilla.org", UrlUtils.stripUserInfo("user@mozilla.org")); assertEquals("ftp: assertEquals("öäü102ß", UrlUtils.stripUserInfo("öäü102ß")); }