void () { final MyElement element = createElement(""); final MyBarConcreteElement bar = element.addBarComposite(); final MyElement child = element.addChildComposite(); final MyElement child2 = element.addChildElement(); final MyFooConcreteElement foo1 = element.addFooComposite(2); final MyFooConcreteElement foo2 = element.addFooComposite(0); assertEquals(Arrays.asList(foo2, bar, child, foo1, child2), element.getCompositeList()); }