LanguageTreeModel extends AbstractTreeTableModel { @Override public int getChildCount(final Object parentNode) { if (parentNode == this.getRoot()) { return this.languageModels.size(); } return 0; } LanguageTreeModel(final ILanguageOptionHandler options); @Override int getColumnCount(); @Override UUID getChild(final Object parentNode, final int index); @Override int getChildCount(final Object parentNode); @Override int getIndexOfChild(final Object parentNode, final Object childNode); @Override boolean isCellEditable(final Object node, final int columnIndex); @Override Object getValueAt(final Object node, final int columnIndex);  }
@Test public void testGetChildCount() { Assert.assertEquals(0, this.model.getChildCount(null)); Assert.assertEquals(5, this.model.getChildCount(this.root)); Assert.assertEquals(0, this.model.getChildCount(this.model.getChild(this.root, 0))); }