### Question:
DocumentTreeNode extends AbstractDocumentTreeNode implements Initializable { private int getPseudoChildCount(DocumentReference documentReference) { int count = 0; for (Map.Entry<String, TreeNode> entry : this.nonLeafChildNodes.entrySet()) { if (hasChild(entry.getKey(), entry.getValue(), documentReference)) { count++; } } if (showAddDocument(documentReference)) { count++; } return count; } DocumentTreeNode(); @Override void initialize();  }### Answer:
@Test public void getPseudoChildCount() { when(this.translationsTreeNode.getChildCount("translations:wiki:Some.Page")).thenReturn(2); when(this.attachmentsTreeNode.getChildCount("attachments:wiki:Some.Page")).thenReturn(1); when(this.classPropertiesTreeNode.getChildCount("classProperties:wiki:Some.Page")).thenReturn(3); when(this.objectsTreeNode.getChildCount("objects:wiki:Some.Page")).thenReturn(5); assertEquals(0L, this.documentTreeNode.getChildCount("document:wiki:Some.Page")); this.documentTreeNode.getProperties().put("showTranslations", true); assertEquals(1L, this.documentTreeNode.getChildCount("document:wiki:Some.Page")); this.documentTreeNode.getProperties().put("showAttachments", true); assertEquals(2L, this.documentTreeNode.getChildCount("document:wiki:Some.Page")); this.documentTreeNode.getProperties().put("showClassProperties", true); assertEquals(3L, this.documentTreeNode.getChildCount("document:wiki:Some.Page")); this.documentTreeNode.getProperties().put("showObjects", true); assertEquals(4L, this.documentTreeNode.getChildCount("document:wiki:Some.Page")); when(this.attachmentsTreeNode.getChildCount("attachments:wiki:Some.Page")).thenReturn(0); assertEquals(3L, this.documentTreeNode.getChildCount("document:wiki:Some.Page")); }