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