void () { registerDomExtender(CollectionDomExtender.class); MyElement myElement = createElement("<a attr=\"xxx\"></a>", MyElement.class); DomCollectionChildDescription description = myElement.getGenericInfo().getCollectionChildDescription("xxx"); assertThat(description).isNotNull(); DomElement element2 = description.addValue(myElement); DomElement element0 = description.addValue(myElement, 0); DomElement element3 = description.addValue(myElement, MyConcreteElement.class); DomElement element1 = description.addValue(myElement, MyConcreteElement.class, 1); assertSameElements(getCustomChildren(myElement), element0, element1, element2, element3); }