CasaItUtils { public static CasaItDocument createDocument(InputStream input) throws SAXException, IOException, ParserConfigurationException { return createDocument(XmlUtils.newDocument(input, true)); } private  CasaItUtils(); static CasaItDocument createDocument(InputStream input); static CasaItDocument createDocument(File xmlFile); static CasaItDocument createDocument(String xmlString); static CasaItDocument createDocument(Document doc); @SuppressWarnings("unused") static Marshaller createMarshaller(); @SuppressWarnings("Duplicates") static Marshaller createMarshaller(String encoding, boolean formatted); static Unmarshaller createUnmarshaller(); synchronized static JAXBContext getContext(); synchronized static ObjectFactory getFactory(); synchronized static void initContext(ClassLoader classloader); static BigDecimal parseDouble(String value); static String printDouble(BigDecimal value); @SuppressWarnings("unused")
    final static String NAMESPACE; @SuppressWarnings("unused")
    final static String PACKAGE; @SuppressWarnings("unused")
    final static ObjectFactory FACTORY; }
@Test public void testCreateDocument() { String transferXml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" + "<container>\n" + " <realestateitems>\n" + " <realestate>\n" + " </realestate>\n" + " </realestateitems>\n" + "</container>"; CasaItDocument doc; try { doc = CasaItUtils.createDocument(transferXml); Assert.assertNotNull( "Transfer was processed.", doc); Assert.assertTrue( "Transfer was processed as CasaITDocument.", doc instanceof CasaItDocument); } catch (Exception ex) { LOGGER.error("Test of CasaITUtils.createDocument failed!"); LOGGER.error("> " + ex.getLocalizedMessage(), ex); Assert.fail("Test of CasaITUtils.createDocument failed!"); } }