@Test
public void testGetVariableContainerElement() {
try {
//TextDocument doc = TextDocument.loadDocument(ResourceUtilities.getTestResourceAsStream("headerFooterHidden.odt"));
TextDocument doc = TextDocument.newTextDocument();
Footer footer = doc.getFooter();
OdfElement odfEle = footer.getVariableContainerElement();
TableBuilder tb = footer.getTableBuilder();
Table tab = tb.newTable();
Assert.assertNotNull(tab);
Assert.assertTrue(2 == tab.getRowCount());
Assert.assertTrue(5 == tab.getColumnCount());
Node nod = odfEle.getFirstChild();
Assert.assertEquals("table:table", nod.getNodeName());
//save
doc.save(ResourceUtilities.newTestOutputFile("footerOutput.odt"));
} catch (Exception e) {
Logger.getLogger(FooterTest.class.getName()).log(Level.SEVERE, null, e);
Assert.fail(e.getMessage());
}
}