ApiNode implements Node { @Override public int getChildCount() { checkChildrenLoaded(); return context.getNodeSize(); } ApiNode(NavigationImpl navigation, NodeContext<ApiNode> context); @Override Node addChild(int index, String childName); @Override Node addChild(String childName); @Override FilteredNode filter(); @Override Node getChild(int index); @Override Node getChild(String childName); @Override int getChildCount(); @Override Node getNode(String... nodePath); @Override Node getNode(NodePath nodePath); @Override String getIconName(); @Override String getDisplayName(); @Override LocalizedString getDisplayNames(); @Override String getName(); @Override NodePath getNodePath(); @Override PageId getPageId(); @Override Node getParent(); @Override Attributes getAttributes(); @Override String getURI(); @Override Visibility getVisibility(); @Override boolean hasChild(String childName); @Override int indexOf(String childName); @Override boolean isChildrenLoaded(); @Override boolean isRoot(); @Override boolean isVisible(); @Override Iterator<Node> iterator(); @Override void moveTo(int index); @Override void moveTo(int index, Node parent); @Override void moveTo(Node parent); @Override boolean removeChild(String childName); @Override void setName(String name); @Override void setIconName(String iconName); @Override void setDisplayName(String displayName); @Override void setDisplayNames(LocalizedString displayName); @Override void setPageId(PageId pageId); @Override void setVisibility(boolean visible); @Override void setVisibility(PublicationDate publicationDate); @Override void setVisibility(Visibility visibility); @Override void sort(Comparator<Node> comparator); @Override String toString();  }
@Test(expected = IllegalStateException.class) public void getChildCount_NotLoaded() { getRoot(false).getChildCount(); }