### Question:
UriHelper { public static boolean hasPath(final URI uri) { final String path = uri.getPath(); if (path != null) { if (path.length() > 0 && !path.equals("/")) { return true; } } return false; }  static boolean areSame(final URI a, final URI b); static boolean areSameGitRepo(final URIish a, final URIish b); static boolean areSameGitRepo(final URI a, final URI b); static boolean hasPath(final URI uri); static boolean isWellFormedUriString(final String uriString); static URI join(final URI collectionUri, final Object... components); static URI join(final String collectionUrl, final Object... components); static String serializeParameters(final Map<String, String> parameters); static final String UTF_8; }### Answer:
@Test public void hasPath_hostOnly() throws Exception { final URI input = URI.create("https: final boolean actual = UriHelper.hasPath(input); Assert.assertEquals(false, actual); }
@Test public void hasPath_hostSlash() throws Exception { final URI input = URI.create("https: final boolean actual = UriHelper.hasPath(input); Assert.assertEquals(false, actual); }
@Test public void hasPath_path() throws Exception { final URI input = URI.create("https: final boolean actual = UriHelper.hasPath(input); Assert.assertEquals(true, actual); }
@Test public void hasPath_pathSlash() throws Exception { final URI input = URI.create("https: final boolean actual = UriHelper.hasPath(input); Assert.assertEquals(true, actual); }