### Question:
TreeTypeMap { protected static String allLables(List<? extends ISerializedObjectTree> list) { Set<String> labels = new LinkedHashSet<String>(); for (ISerializedObjectTree t : list) { if (t.label() != null) labels.add(t.label()); } if (labels.isEmpty()) { return null; } StringBuilder sb = new StringBuilder(); boolean first = true; for (String s : labels) { if (first) { first = false; } else { sb.append("|"); } sb.append(s); } return sb.toString(); } TreeTypeMap(List<? extends ISerializedObjectTree> source); List<ISerializedObjectTree> compressedResult(); boolean hasLessEntries(int size);  }### Answer:
@Test public void joinLabels() throws IOException { ISerializedObjectTree source = Trees.fromResource(getClass(), "labels"); assertEquals("a|b|c", TreeTypeMap.allLables(source.children())); }
@Test public void noLabels() throws IOException { assertEquals(null, TreeTypeMap.allLables(new ArrayList<ISerializedObjectTree>())); }