@Test
public void testNewTextDocument() throws Exception {
try {
TextDocument tdoc = TextDocument.newTextDocument(TextDocument.OdfMediaType.TEXT_MASTER);
OdfMediaType odfMediaA = tdoc.getOdfMediaType();
String filePath = ResourceUtilities.getAbsolutePath("");
tdoc.save(filePath + "testNewTextDocument.odt");
//validate
TextDocument tdocument = TextDocument.loadDocument(filePath + "testNewTextDocument.odt");
OdfMediaType odfMediaB = tdocument.getOdfMediaType();
Assert.assertEquals(odfMediaA, odfMediaB);
} catch (Exception e) {
LOG.log(Level.SEVERE, e.getMessage(), e);
Assert.fail(e.getMessage());
}