subgroup.setMinOccurs(0);
subgroup.setMaxOccurs(Particle.UNBOUNDED);
group.addGroup(subgroup);
// create an element for choice
ElementDecl elem = new ElementDecl(_schema);
elem.setName("myStringType");
elem.setTypeReference("string");
subgroup.addElementDecl(elem);
// create a choice element for sequence element
subgroup = new Group();
subgroup.setOrder(Order.choice);
subgroup.setMinOccurs(0);
subgroup.setMaxOccurs(Particle.UNBOUNDED);
group.addGroup(subgroup);
// create an element for choice
elem = new ElementDecl(_schema);
elem.setName("myStringType2");
elem.setTypeReference("string");
subgroup.addElementDecl(elem);
// compare
TestResult result = doTest("group_2subgroups.xsd");
assertEquals("single attribute test failed", TestResult.IDENTICAL,
result);