### Question:
PluginManagerUtils { public static String dirName(Object urlString) { requireNonNull(urlString); return dirName(urlString.toString()); } private  PluginManagerUtils(); static String appendPathOntoUrl(Object urlString, Object... pathSection); static String appendPathOntoUrl(String urlString, String... pathSection); static String removePossibleWrapperText(String urlText); static String dirName(Object urlString); static String dirName(String urlString); static String removePath(Object urlString); static String removePath(String urlString);  }### Answer:
@Test public void dirnameObjectTest() throws MalformedURLException { String result = PluginManagerUtils.dirName(new URL("http: assertThat(result).isEqualTo("http: }
@Test public void dirnameTest() { String result = PluginManagerUtils.dirName("http: assertThat(result).isEqualTo("http: }
@Test public void dirnameTestNoPath() { String result = PluginManagerUtils.dirName("http: assertThat(result).isEqualTo("http: }
@Test public void dirnameTestNoPathPlusPort() { String result = PluginManagerUtils.dirName("http: assertThat(result).isEqualTo("http: }
@Test public void dirnameTestNoSlashes() { String result = PluginManagerUtils.dirName("bob.com"); assertThat(result).isEqualTo("bob.com"); }