DaftIeDocument extends XmlConvertableDocument<Daft, DaftIeVersion> { @Override public Daft toObject() throws JAXBException { this.upgradeToLatestVersion(); return (Daft) DaftIeUtils.createUnmarshaller().unmarshal(this.getDocument()); } DaftIeDocument(Document document); @Override DaftIeVersion getDocumentVersion(); @Override DaftIeVersion getLatestVersion(); static boolean isReadable(Document doc); static DaftIeDocument newDocument(); static DaftIeDocument newDocument(Daft daft); @Override void setDocumentVersion(DaftIeVersion version); @Override Daft toObject();  }
@Test public void testToObject() { try { DaftIeDocument doc = new DaftIeDocument(buildExampleDocument(DaftIeUtils.VERSION.toReadableVersion())); Daft obj = doc.toObject(); Assert.assertNotNull( "Created object for transfer document.", obj); } catch (Exception ex) { LOGGER.error("Test of DaftIeDocument.toObject failed!"); LOGGER.error("> " + ex.getLocalizedMessage(), ex); Assert.fail("Test of DaftIeDocument.toObject failed!"); } }