### Question:
GitPushEvent extends AbstractHookEvent { static URI determineCollectionUri(final URI repoApiUri) { final String path = repoApiUri.getPath(); final int i = path.indexOf("_apis/"); if (i == -1) { final String template = "Repository url '%s' did not contain '_apis/'."; throw new IllegalArgumentException(String.format(template, repoApiUri)); } final String pathBeforeApis = path.substring(0, i); final URI uri; try { uri = new URI(repoApiUri.getScheme(), repoApiUri.getAuthority(), pathBeforeApis, repoApiUri.getQuery(), repoApiUri.getFragment()); } catch (final URISyntaxException e) { throw new Error(e); } return uri; }  @Override JSONObject perform(final ObjectMapper mapper, final Event serviceHookEvent, final String message, final String detailedMessage);  }### Answer:
@Test public void determineCollectionUri_sample() throws Exception { final URI input = URI.create("https: final URI actual = GitPushEvent.determineCollectionUri(input); final URI expected = URI.create("https: Assert.assertEquals(expected, actual); }