XmlSchemaComplexType t = (XmlSchemaComplexType)elem.getSchemaType();
assertNotNull(t);
XmlSchemaObjectCollection c = t.getAttributes();
for (Iterator i = c.getIterator(); i.hasNext(); ) {
XmlSchemaAttributeGroupRef agrn = (XmlSchemaAttributeGroupRef)i.next();
assertEquals(new QName("http://soapinterop.org/types",
"department"), agrn.getRefName());
}
XmlSchemaObjectTable attG = schema.getAttributeGroups();
assertNotNull(attG);
assertEquals(1, attG.getCount());