public void testCreateStyleTOC() {
try {
TextDocument doc = buildSample();
Assert.assertNotNull(doc);
TOCStyle tocstyle = new TOCStyle();
tocstyle.addStyle("User_20_Index_20_1", 1);
tocstyle.addStyle("User_20_Index_20_2", 2);
tocstyle.addStyle("User_20_Index_20_3", 3);
tocstyle.addStyle("User_20_Index_20_4", 4);
tocstyle.addStyle("User_20_Index_20_5", 5);
tocstyle.addStyle("User_20_Index_20_6", 6);
tocstyle.addStyle("User_20_Index_20_7", 7);
tocstyle.addStyle("User_20_Index_20_8", 8);
tocstyle.addStyle("User_20_Index_20_9", 9);
tocstyle.addStyle("User_20_Index_20_10", 10);
LOG.info(tocstyle.toString());
Paragraph paragraph1 = doc.getParagraphByIndex(0, true);
TextTableOfContentElement textTableOfContentElement = doc
.createTOCwithStyle(paragraph1, tocstyle, true);
Assert.assertNotNull(textTableOfContentElement);