ContributionDescriptor cd = (ContributionDescriptor) l.get(0);
l = cd.getElements();
assertEquals(2, l.size());
Element e = (Element) l.get(0);
assertEquals("foo1", e.getElementName());
assertEquals(0, e.getElements().size());
assertEquals("foo1 content", e.getContent());
checkAttributes(e, new String[] { "bar", "baz" });
e = (Element) l.get(1);
assertEquals("foo2", e.getElementName());
assertEquals(1, e.getElements().size());
assertEquals("", e.getContent());
checkAttributes(e, new String[] { "zip", "zap", "fred", "barney" });
l = e.getElements();
e = (Element) l.get(0);
assertEquals("foo3", e.getElementName());
assertEquals(0, e.getElements().size());
assertEquals("", e.getContent());
checkAttributes(e, new String[] { "gnip", "gnop" });
}