NaryTreeNode extends AbstractTreeNode<D, N> { @Pure @Override public final int getChildCount() { return (this.children == null) ? 0 : this.children.size(); } NaryTreeNode();  NaryTreeNode(Collection<D> data);  NaryTreeNode(D data);  NaryTreeNode(boolean useLinkedList);  NaryTreeNode(boolean useLinkedList, boolean copyDataCollection, List<D> data);  NaryTreeNode(boolean useLinkedList, D data); @Pure @Override Class<? extends Enum<?>> getPartitionEnumeration(); @Override void clear(); @Pure @Override final int getChildCount(); @Pure @Override int getNotNullChildCount(); @Pure @Override final int indexOf(N child); @Pure @Override final N getChildAt(int index); boolean moveTo(N newParent); @Override boolean moveTo(N newParent, int index); @Override @SuppressWarnings("checkstyle:npathcomplexity") boolean setChildAt(int index, N newChild); @Override final boolean removeChild(N child); final boolean addChild(N child); final boolean addChild(int index, N newChild); @Pure @Override final boolean isLeaf(); @Override void getChildren(Object[] array); @Pure @Override int getMinHeight(); @Pure @Override int getMaxHeight();  }
@Test public void getChildCount() { assertEquals(2, this.root.getChildCount()); assertEquals(1, this.child1.getChildCount()); assertEquals(0, this.child2.getChildCount()); assertEquals(0, this.node.getChildCount()); }