}
@Test
public void shouldAddingChildrenAtIndex() throws Exception
{
Panel childA = new MockPanel();
Panel childB = new MockPanel();
Panel childC = new MockPanel();
panel.add(0, childA);
panel.add(0, childB);
panel.add(1, childC);
assertSame(childA, panel.getChildren().get(2));
assertSame(childB, panel.getChildren().get(0));
assertSame(childC, panel.getChildren().get(1));
assertSame(panel, childA.getParent());
assertSame(panel, childB.getParent());
assertSame(panel, childC.getParent());
}