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