public static List<String> split(String path) {
    //
    String[] pathelements = path.split("/");
    List<String> dirs = new ArrayList<String>(pathelements.length);
    for (String pathelement : pathelements) {
      if (!pathelement.isEmpty()) {
        dirs.add(pathelement);
      }
    }
    return dirs;
  }
@Test
  public void testSplittingEmpty() throws Throwable {
    assertEquals(0, split("").size());
    assertEquals(0, split("/").size());
    assertEquals(0, split("///").size());
  }