DefaultActionGroup extends ActionGroup { public final int getChildrenCount() { return actionList.size(); } DefaultActionGroup(ActionManager actionManager);  DefaultActionGroup(ActionManager actionManager, Action... actions);  DefaultActionGroup(String shortName, boolean popup, ActionManager actionManager); final void add(Action action, ActionManager actionManager); final void add(Action action); final ActionInGroup addAction(Action action); final void addSeparator(); final void add(Action action, Constraints constraint); final ActionInGroup addAction(Action action, Constraints constraint); final void add(Action action, Constraints constraint, ActionManager actionManager); final ActionInGroup addAction(Action action, Constraints constraint, ActionManager actionManager); final void remove(Action actionToRemove); final void removeAll(); @Override final Action[] getChildren(ActionEvent e); final int getChildrenCount(); final Action[] getChildActionsOrStubs(); final void addAll(ActionGroup group); final void addAll(Collection<Action> actionList); final void addAll(Action... actions); void addSeparator(String separatorText);  }
@Test public void getChildrenCount() { mockRegisterActions(); defaultActionGroup.add(firstAction); defaultActionGroup.add(secondAction, new Constraints(AFTER, "fifthAction")); defaultActionGroup.add(thirdAction); defaultActionGroup.add(fourthAction); defaultActionGroup.add(fifthAction); defaultActionGroup.add(sixthAction); int count = defaultActionGroup.getChildrenCount(); assertThat(count).isEqualTo(6); }