CategoryHelper { public static CategoryPath addParentCategory(String category, CategoryPath categoryPath) { List<String> categoryPathList = toList(categoryPath); categoryPathList.add(0, category); return toCategoryPath(categoryPathList); }  static CategoryPath addSubCategory(CategoryPath categoryPath, String category); static CategoryPath addParentCategory(String category, CategoryPath categoryPath);  }
@Test public void testAddParentCategory() { CategoryPath result = CategoryHelper.addParentCategory("a", new CategoryPath("b/c/d", '/')); assertEquals("a/b/c/d", result.toString()); }