Textbox extends Frame implements ListContainer, ParagraphContainer { public void clearList() { getListContainerImpl().clearList(); } private  Textbox(DrawTextBoxElement textbox); static Textbox getInstanceof(DrawTextBoxElement element); static Textbox newTextbox(TextboxContainer container); void setTextContent(String content); void clearContent(); String getTextContent(); @Override DrawTextBoxElement getOdfElement(); List addList(); List addList(ListDecorator decorator); void clearList(); OdfElement getListContainerElement(); Iterator<List> getListIterator(); boolean removeList(List list); Paragraph addParagraph(String textContent); OdfElement getParagraphContainerElement(); boolean removeParagraph(Paragraph para); Paragraph getParagraphByIndex(int index, boolean isEmptyParagraphSkipped); Paragraph getParagraphByReverseIndex(int reverseIndex, boolean isEmptyParagraphSkipped); Iterator<Paragraph> getParagraphIterator();  }
@Test public void testClearList() { try { PresentationDocument presentDoc = PresentationDocument.newPresentationDocument(); Slide slide1 = presentDoc.newSlide(1, "slide1", SlideLayout.TITLE_PLUS_2_TEXT_BLOCK); Textbox titleTextbox = slide1.getTextboxByUsage(PresentationDocument.PresentationClass.TITLE).get(0); Assert.assertNotNull(titleTextbox); titleTextbox.setTextContent("This is Title"); java.util.List<Textbox> boxList = slide1.getTextboxByUsage(PresentationDocument.PresentationClass.OUTLINE); Assert.assertNotNull(boxList); Assert.assertEquals(2, boxList.size()); Textbox leftTextbox = boxList.get(0); List list1 = leftTextbox.addList(); list1.addItem("Test outline1"); list1.addItem("Test outline2"); leftTextbox.clearList(); List list3 = leftTextbox.addList(); list3.addItem("Test line3"); list3.addItem("Test line3"); Textbox rightTextbox = boxList.get(1); Assert.assertNotNull(rightTextbox); ListDecorator decorator = new NumberDecorator(presentDoc); rightTextbox.setBackgroundColor(Color.RED); List list2 = rightTextbox.addList(decorator); list2.addItem("test one"); list2.addItem("test two"); list2.addItem("test three"); rightTextbox.clearList(); Iterator iterator = rightTextbox.getListIterator(); Assert.assertEquals(false, iterator.hasNext()); presentDoc.save(ResourceUtilities.newTestOutputFile("abc.odp")); } catch (Exception e) { Logger.getLogger(TextBoxTest.class.getName()).log(Level.SEVERE, null, e); Assert.fail(); } }