URLFetcher { @VisibleForTesting String sanitized(String url) { if (url != null) { final Matcher matcher = GIT_HTTP_URL_PATTERN.matcher(url); if (matcher.find()) { return matcher.group("sanitized"); } } return url; }  String fetchSafely(@NotNull final String url); String fetch(@NotNull final String url);  }
@Test public void checkDotGitRemovedFromURL() { String result = urlFetcher.sanitized("https: assertEquals("https: result = urlFetcher.sanitized("http: assertEquals("http: }