OdfDocument docWithdoubleEmbeddedDoc = OdfDocument.loadDocument(TEST_FILE_EMBEDDED_EMBEDDED);
OdfDocument doubleEmbeddedDoc =docWithdoubleEmbeddedDoc.loadSubDocument("Object 1/Object in Object1");
OdfContentDom dEDcontentDom = doubleEmbeddedDoc.getContentDom();
TextSpanElement spanTest = (TextSpanElement) xpath.evaluate("//text:span[last()]", dEDcontentDom, XPathConstants.NODE);
Assert.assertEquals(spanTest.getTextContent(), TEST_SPAN_TEXT);
} catch (Exception ex) {
Logger.getLogger(DocumentCreationTest.class.getName()).log(Level.SEVERE, null, ex);
Assert.fail("Failed with " + ex.getClass().getName() + ": '" + ex.getMessage() + "'");
}