assertEquals(1, extensionElementMap.size());
List<ExtensionElement> extensionElements = extensionElementMap.get("test");
assertEquals(2, extensionElements.size());
ExtensionElement extensionElement = extensionElements.get(0);
assertNotNull(extensionElement);
assertEquals("test", extensionElement.getName());
assertEquals("custom", extensionElement.getNamespacePrefix());
assertEquals("http://custom.org/bpmn", extensionElement.getNamespace());
assertEquals(2, extensionElement.getAttributes().size());
List<ExtensionAttribute> attributes = extensionElement.getAttributes().get("id");
assertEquals(1, attributes.size());
ExtensionAttribute attribute = attributes.get(0);
assertNotNull(attribute);
assertEquals("id", attribute.getName());
assertEquals("test", attribute.getValue());
assertNull(attribute.getNamespace());
assertNull(attribute.getNamespacePrefix());
attributes = extensionElement.getAttributes().get("name");
assertEquals(1, attributes.size());
attribute = attributes.get(0);
assertNotNull(attribute);
assertEquals("name", attribute.getName());
assertEquals("test", attribute.getValue());
assertEquals(2, extensionElement.getChildElements().size());
List<ExtensionElement> childExtensions = extensionElement.getChildElements().get("name");
assertEquals(2, childExtensions.size());
ExtensionElement childExtension = childExtensions.get(0);
assertNotNull(childExtension);
assertEquals("name", childExtension.getName());
assertEquals("custom", childExtension.getNamespacePrefix());
assertEquals("http://custom.org/bpmn", childExtension.getNamespace());
assertEquals(0, childExtension.getAttributes().size());
assertEquals(1, childExtension.getChildElements().size());
List<ExtensionElement> subChildExtensions = childExtension.getChildElements().get("test");
assertEquals(1, subChildExtensions.size());
childExtension = subChildExtensions.get(0);
assertNotNull(childExtension);
assertEquals("test", childExtension.getName());
assertEquals("custom", childExtension.getNamespacePrefix());
assertEquals("http://custom.org/bpmn", childExtension.getNamespace());
assertEquals(0, childExtension.getAttributes().size());
assertEquals(0, childExtension.getChildElements().size());
assertEquals("test", childExtension.getElementText());
childExtensions = extensionElement.getChildElements().get("description");
assertEquals(1, childExtensions.size());
childExtension = childExtensions.get(0);
assertNotNull(childExtension);
assertEquals("description", childExtension.getName());
assertEquals(1, childExtension.getAttributes().size());
attributes = childExtension.getAttributes().get("id");
attribute = attributes.get(0);
assertNotNull(attribute);
assertEquals("id", attribute.getName());
assertEquals("test", attribute.getValue());
assertEquals("custom2", attribute.getNamespacePrefix());