CasaItDocument extends XmlDocument<Container> { public static CasaItDocument newDocument() throws ParserConfigurationException, JAXBException { return newDocument(CasaItUtils.getFactory().createContainer()); } CasaItDocument(Document document); static boolean isReadable(Document doc); static CasaItDocument newDocument(); static CasaItDocument newDocument(Container container); @Override Container toObject();  }
@Test @Ignore public void testToXml() { Container.Realestateitems.Realestate obj = CasaItUtils.getFactory().createContainerRealestateitemsRealestate(); obj.setDescription(CasaItUtils.getFactory().createContainerRealestateitemsRealestateDescription()); obj.getDescription().setValue("an example property"); Container container = CasaItUtils.getFactory().createContainer(); container.setRealestateitems(CasaItUtils.getFactory().createContainerRealestateitems()); container.getRealestateitems().getRealestate().add(obj); try { CasaItDocument doc = CasaItDocument.newDocument(container); String xml = doc.toXmlString(true); LOGGER.info("XML: " + xml); } catch (Exception ex) { LOGGER.error("Test of CasaITDocument.toXml failed!"); LOGGER.error("> " + ex.getLocalizedMessage(), ex); Assert.fail("Test of CasaITDocument.toXml failed!"); } }