StringUtil { public static String[] splitAtLastSlash(String uri) { int finalSlashIndex = uri.lastIndexOf('/'); return finalSlashIndex == -1 ? new String[] {uri} : new String[] {uri.substring(0, finalSlashIndex + 1), uri.substring(finalSlashIndex + 1)}; } protected  StringUtil(); static String[] splitAtLastSlash(String uri); static String suffixAfterLastSlash(String uri); static String escapeDoubleQuotes(String s);  }
@Test public void splitAtLastSlash() { assertThat(StringUtil.splitAtLastSlash(UBERON_2000098_URL)) .isEqualTo(new String[]{"http: assertThat(StringUtil.splitAtLastSlash("foobar")).isEqualTo(new String[]{"foobar"}); }