void () { assertEquals("dir1/dir2", Paths.getParentOf("dir1/dir2/file")); assertEquals("", Paths.getParentOf("file")); assertEquals("c:", Paths.getParentOf("c:/file")); assertEquals("/", Paths.getParentOf("/file")); assertEquals("/dir", Paths.getParentOf("/dir/file")); }