assertTrue("Differences after reconverting to schema: " + problems, compareXmlObjects(xmlObject, expected, problems));
boolean ok2 = compareXmlObjects(xmlObject, expected, problems); assertTrue("Differences after reconverting to schema: " + problems, ok2);  xmlObject = SchemaConversionUtils.convertToEJBSchema(xmlObject); boolean ok3 = compareXmlObjects(xmlObject, expected,  problems); assertTrue("Differences after reconverting to ejb schema: " + problems, ok3);
    public void testXMLBeansTransform() throws Exception {        File srcXml = new File("src/test-data/j2ee_1_3dtd/ejb-jar.xml");        File expectedOutputXml = new File("src/test-data/j2ee_1_3dtd/ejb-jar-21.xml");        XmlObject xmlObject = XmlObject.Factory.parse(srcXml);        xmlObject = SchemaConversionUtils.convertToEJBSchema(xmlObject);        XmlObject expected = XmlObject.Factory.parse(expectedOutputXml);        List problems = new ArrayList();        assertTrue("Differences: " + problems, compareXmlObjects(xmlObject, expected, problems));        //make sure trying to convert twice has no bad effects        XmlCursor cursor2 = xmlObject.newCursor();        try {            String schemaLocationURL = "http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd";            String version = "2.1";            assertFalse(SchemaConversionUtils.convertToSchema(cursor2, schemaLocationURL, version));        } finally {            cursor2.dispose();        }        assertTrue("Differences after reconverting to schema: " + problems, compareXmlObjects(xmlObject, expected, problems));    }