AbstractOrderedLayout layout2 = new VerticalLayout();
layout1.addComponent(children[0]);
layout1.addComponent(children[1]);
layout2.addComponent(children[2]);
layout2.addComponent(children[3]);
layout2.addComponent(children[1], 1);
assertOrder(layout1, new int[] { 0 });
assertOrder(layout2, new int[] { 2, 1, 3 });