### Question:
CategoryName extends CompositeRepoName { public static CategoryName ofList(List<String> segments) { return new CategoryName(segments); } private  CategoryName(String name); private  CategoryName(List<String> segments); static CategoryName of(String name); static CategoryName ofUri(String fragment); static CategoryName ofList(List<String> segments); String asUri(); static CategoryName emptyName(); CategoryName getParent();  }### Answer:
@Test public void testInstantiation() { assertEquals("test", new CompositeRepoName("test", ".").getName("/")); assertEquals("test", CategoryName.ofList(Lists.newArrayList("test")) .getName("/")); }
@Test public void testAsCategoryPath() { assertEquals("123.ABC._", CategoryName .ofList(Lists.newArrayList(null, "123", "ABC", "_")) .getName()); }