CasaItDocument extends XmlDocument<Container> { @Override public Container toObject() throws JAXBException { return (Container) CasaItUtils.createUnmarshaller().unmarshal(this.getDocument()); } CasaItDocument(Document document); static boolean isReadable(Document doc); static CasaItDocument newDocument(); static CasaItDocument newDocument(Container container); @Override Container toObject();  }
@Test public void testToObject() { try { CasaItDocument doc = new CasaItDocument(buildExampleDocument()); Container obj = doc.toObject(); Assert.assertNotNull( "Created object for transfer document.", obj); } catch (Exception ex) { LOGGER.error("Test of CasaITDocument.toObject failed!"); LOGGER.error("> " + ex.getLocalizedMessage(), ex); Assert.fail("Test of CasaITDocument.toObject failed!"); } }