FolderPath { public String serializeAsString() { return PATH_SEPARATOR + StringUtils.join(path, PATH_SEPARATOR); } 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 serializeAsString() throws Exception { assertEquals("/foo/bar/beer", new FolderPath("foo", "bar", "beer").serializeAsString()); }