void () { final MyElement myElement = createElement("<a><foo/><bar/><foo xmlns=\"z\"/></a>", MyElement.class); final XmlTag tag = myElement.getXmlTag(); final List<MyElement> customChildren = myElement.getCustomChildren(); assertOrderedEquals(customChildren, myElement.getGenericInfo().getCustomNameChildrenDescription().get(0).getValues(myElement)); assertOrderedCollection(customChildren, element -> { assertInstanceOf(element, MyElement.class); assertEquals(tag.getSubTags()[0], element.getXmlTag()); }, element -> { assertInstanceOf(element, MyElement.class); assertEquals(tag.getSubTags()[1], element.getXmlTag()); }, element -> { assertInstanceOf(element, MyElement.class); assertEquals(tag.getSubTags()[2], element.getXmlTag()); }); }