@Test
public void getParent() throws Exception {

    assertNull(Strings.getParent(null));
    assertEquals("", Strings.getParent(""));
    assertNull(Strings.getParent("a"));
    assertEquals("/", Strings.getParent("/"));
    assertEquals("/", Strings.getParent("/a"));
    assertEquals("/a", Strings.getParent("/a/b"));
    assertEquals("/a/b", Strings.getParent("/a/b/c"));
    assertEquals("/a", Strings.getParent(Strings.getParent("/a/b/c")));
    assertEquals("a", Strings.getParent("a/b"));
    assertEquals("a/b", Strings.getParent("a/b/c"));
    assertEquals("a", Strings.getParent(Strings.getParent("a/b/c")));
}