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