### Question:
GitUrlSegment { public static GitUrlSegment of(String gitRemoteUrl) { if(org.apache.commons.lang3.StringUtils.isBlank(gitRemoteUrl)) { return null; } String url = gitRemoteUrl.toLowerCase(); if(!url.startsWith("https: return null; } if(!url.endsWith(".git")) { return null; } url = url.substring("https: url = url.substring(0, url.length() - ".git".length()); String[] segments = url.split("/"); if(segments.length != 3) { return null; } return new GitUrlSegment(segments[0], segments[1], segments[2]); } GitUrlSegment(String website, String owner, String repoName); String getWebsite(); String getOwner(); String getRepoName(); static GitUrlSegment of(String gitRemoteUrl);  }### Answer:
@Test public void of_git_remote_url_isBlank() { GitUrlSegment segment = GitUrlSegment.of(null); assertThat(segment).isNull(); segment = GitUrlSegment.of(" "); assertThat(segment).isNull(); }
@Test public void of_git_remote_url_not_starts_with_https() { GitUrlSegment segment = GitUrlSegment.of("http: assertThat(segment).isNull(); }
@Test public void of_git_remote_url_not_ends_with_git() { GitUrlSegment segment = GitUrlSegment.of("https: assertThat(segment).isNull();; }
@Test public void of_git_url_not_three_segment() { GitUrlSegment segment = GitUrlSegment.of("https: assertThat(segment).isNull(); segment = GitUrlSegment.of("https: assertThat(segment).isNull(); }