@Test
public void testGetSheetByIndex() throws Exception{
File file = new File(ResourceUtilities.getAbsolutePath("TestSpreadsheetTable.ods"));
SpreadsheetDocument spDocument = SpreadsheetDocument.loadDocument(file);
//index < 0 , Not expected, table ==null
Table tablenull = spDocument.getSheetByIndex(-1);
Assert.assertTrue((tablenull == null));
//index > 0
//index = 0
Table tableSheet0 = spDocument.getSheetByIndex(0);
Assert.assertTrue((tableSheet0 != null));
Assert.assertEquals("Sheet1", tableSheet0.getTableName());
Assert.assertEquals(29, tableSheet0.getColumnCount());
//index = 1
Table tableSheet1 = spDocument.getSheetByIndex(1);
Assert.assertTrue((tableSheet1 != null));
Assert.assertEquals("Sheet2", tableSheet1.getTableName());
Assert.assertEquals(1, tableSheet1.getColumnCount());
}