subChildren.add(subSubChildren);
subChildren.add("23");
Object[] complexChildren = new Object[] { "1", subChildren, "3" };
DynamicUtilTreeNode.createChildren(root, complexChildren);
assertEquals(3, root.getChildCount());
DynamicUtilTreeNode child1 = (DynamicUtilTreeNode) root.getChildAt(0);
assertFalse(child1.getAllowsChildren());
assertEquals(0, child1.getChildCount());
assertEquals("1", child1.getUserObject());
assertEquals("1", child1.childValue);
assertTrue(child1.loadedChildren);
DynamicUtilTreeNode child2 = (DynamicUtilTreeNode) root.getChildAt(1);
assertTrue(child2.getAllowsChildren());
assertEquals(3, child2.getChildCount());
assertEquals(subChildren, child2.getUserObject());
assertSame(subChildren, child2.childValue);
assertTrue(child2.loadedChildren);
assertEquals(0, root.getChildAt(2).getChildCount());
assertEquals("3", ((DefaultMutableTreeNode) root.getChildAt(2)).getUserObject());
assertEquals(3, child2.getChildCount());
assertEquals(0, child2.getChildAt(0).getChildCount());
assertEquals(2, child2.getChildAt(1).getChildCount());
assertEquals(0, child2.getChildAt(2).getChildCount());
}