DepTreeNode implements Cloneable, Serializable { public Map<String, DepTreeNode> getChildren() { Map<String, DepTreeNode> result; if (children != null) { result = Collections.unmodifiableMap(children); } else { result = Collections.emptyMap(); } return result; } DepTreeNode(String name, URI uri); String getName(); long lastModified(); long lastModifiedDep(); long lastModifiedDepTree(); DepTreeNode getParent(); DepTreeNode getRoot(); String[] getDefineDepArray(); String[] getRequireDepArray(); String[] getDependentFeatures(); String getParentPath(); String getFullPathName(); void add(DepTreeNode child); void overlay(DepTreeNode node); void addAll(Collection<DepTreeNode> children); DepTreeNode createOrGet(String path, URI uri); DepTreeNode getDescendent(String path); void remove(DepTreeNode child); void removeAll(); Map<String, DepTreeNode> getChildren(); DepTreeNode getChild(String name); void prune(); void setDependencies(String[] defineDependencies, String[] requireDependencies, String[] dependentFeatures, long lastModifiedFile, long lastModifiedDep); @Override String toString(); String toStringTree(); @Override DepTreeNode clone(); IConfig getConfig();  }
@Test public void testGetChildren() { DepTreeNode root = new DepTreeNode("root", null); DepTreeNode a = root.createOrGet("a", null); root.createOrGet("a/a", null); root.createOrGet("a/b", null); DepTreeNode b = root.createOrGet("b", null); DepTreeNode c = root.createOrGet("c", null); Map<String, DepTreeNode> map = root.getChildren(); assertEquals(3, map.size()); assertEquals(a, map.get("a")); assertEquals(b, map.get("b")); assertEquals(c, map.get("c")); try { map.remove("a"); fail("Exception not thrown"); } catch (UnsupportedOperationException ex) {} root.removeAll(); map = root.getChildren(); assertEquals(0, map.size()); }