FolderPath { public static FolderPath deserializeFromString(String pathAsString) { if (pathAsString == null) { return null; } return new FolderPath(ArrayUtils.removeElements(pathAsString.split(PATH_SEPARATOR.toString()), "")); } FolderPath(String... path);  FolderPath(FolderPath parent, String... path); FolderPath getParent(); boolean isRoot(); String getName(); void setName(String newName); String serializeAsString(); static FolderPath deserializeFromString(String pathAsString); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void deserializeFromString() throws Exception { assertEquals(new FolderPath("foo", "bar", "beer"), FolderPath.deserializeFromString("/foo/bar/beer")); }