getClass().getResource("test-extrainfo-nested.xml"), true);
assertNotNull(md);
assertEquals(4, md.getExtraInfo().size());
assertEquals("56576", md.getExtraInfo().get("e:someExtra"));
assertEquals(2, md.getExtraInfos().size());
ExtraInfoHolder someExtraElement = md.getExtraInfos().get(0);
assertEquals("e:someExtra", someExtraElement.getName());
assertEquals("56576", someExtraElement.getContent());
assertEquals(0, someExtraElement.getAttributes().size());
assertEquals(0, someExtraElement.getNestedExtraInfoHolder().size());
ExtraInfoHolder someExtraElementWithAttributes = md.getExtraInfos().get(1);
assertEquals("e:someExtraWithAttributes", someExtraElementWithAttributes.getName());
assertEquals("", someExtraElementWithAttributes.getContent());
assertEquals(2, someExtraElementWithAttributes.getAttributes().size());
assertEquals("foo", someExtraElementWithAttributes.getAttributes().get("attr1"));
assertEquals("bar", someExtraElementWithAttributes.getAttributes().get("attr2"));
assertEquals(1, someExtraElementWithAttributes.getNestedExtraInfoHolder().size());
ExtraInfoHolder anotherExtraInfoElement = someExtraElementWithAttributes
.getNestedExtraInfoHolder().get(0);
assertEquals("e:anotherExtraInfo", anotherExtraInfoElement.getName());
assertEquals("", anotherExtraInfoElement.getContent());
assertEquals(1, anotherExtraInfoElement.getAttributes().size());
assertEquals("foobar", anotherExtraInfoElement.getAttributes().get("myattribute"));
assertEquals(1, anotherExtraInfoElement.getNestedExtraInfoHolder().size());
ExtraInfoHolder yetAnotherExtraInfoElement = anotherExtraInfoElement
.getNestedExtraInfoHolder().get(0);
assertEquals("e:yetAnotherExtraInfo", yetAnotherExtraInfoElement.getName());
assertEquals("", yetAnotherExtraInfoElement.getContent());
assertEquals(1, yetAnotherExtraInfoElement.getAttributes().size());
assertEquals("value", yetAnotherExtraInfoElement.getAttributes().get("anAttribute"));
assertEquals(0, yetAnotherExtraInfoElement.getNestedExtraInfoHolder().size());
}