SimpleNode implements Node { @Override public int jjtGetNumChildren() { return (children == null) ? 0 : children.length; } SimpleNode(int i); abstract double calculateScore(FormulaContext context); @Override void jjtOpen(); @Override void jjtClose(); @Override void jjtSetParent(Node n); @Override Node jjtGetParent(); @Override void jjtAddChild(Node n, int i); @Override Node jjtGetChild(int i); @Override int jjtGetNumChildren(); void jjtSetValue(Object value); Object jjtGetValue(); @Override Object jjtAccept(FormulaParserVisitor visitor, Object data); Object childrenAccept(FormulaParserVisitor visitor, Object data); @Override String toString(); String toString(String prefix); void dump(String prefix);  }
@Test public void testEmptyChildren() { SimpleNode node = newNode(0); assertEquals(0, node.jjtGetNumChildren()); }