JAXBParser parser = newJAXBParser();
InputSource isource = new InputSource(new StringReader(schemaSource));
isource.setSystemId("testGlobalBindingsDefaults.xsd");
JAXBSchema schema = (JAXBSchema) parser.parse(isource);
JAXBGlobalBindings globalBindings = schema.getJAXBGlobalBindings();
String collectionType = globalBindings.getCollectionType();
assertEquals("java.util.ArrayList", collectionType);
XsQName[] typesafeEnumBase = globalBindings.getTypesafeEnumBase();
assertNotNull(typesafeEnumBase);
assertEquals(2, typesafeEnumBase.length);
XsQName qName = typesafeEnumBase[0];
assertEquals(qName, XSString.getInstance().getName());
qName = typesafeEnumBase[1];
assertEquals(qName, XSNCName.getInstance().getName());
boolean bindingStyleModelGroup = globalBindings.isBindingStyleModelGroup();
assertTrue(bindingStyleModelGroup);
boolean choiceContentProperty = globalBindings.isChoiceContentProperty();
assertTrue(choiceContentProperty);
boolean enableFailFastCheck = globalBindings.isEnableFailFastCheck();
assertTrue(enableFailFastCheck);
boolean enableJavaNamingConventions = globalBindings.isEnableJavaNamingConventions();
assertTrue(!enableJavaNamingConventions);
boolean fixedAttributeAsConstantProperty = globalBindings.isFixedAttributeAsConstantProperty();
assertTrue(fixedAttributeAsConstantProperty);
boolean generateIsSetMethod = globalBindings.isGenerateIsSetMethod();
assertTrue(generateIsSetMethod);
JAXBGlobalBindings.UnderscoreBinding underscoreBinding = globalBindings.getUnderscoreBinding();
assertEquals(JAXBGlobalBindings.UnderscoreBinding.AS_CHAR_IN_WORD, underscoreBinding);
JAXBJavaType[] javaTypes = globalBindings.getJavaType();
assertNotNull(javaTypes);
assertEquals(0, javaTypes.length);
}