@Test
public void testRemoveTextbox() {
try {
// new image in presentation
PresentationDocument pDoc = PresentationDocument.newPresentationDocument();
Slide slide = pDoc.newSlide(0, "slide name ", SlideLayout.TITLE_OUTLINE);
java.util.List<Textbox> listTbox = slide.getTextboxByUsage(PresentationClass.TITLE);
Textbox titleBox = listTbox.get(0);
titleBox.setBackgroundColor(Color.BLUE);
//titleBox.setImage(ResourceUtilities.getURI("image_list_item.png"));
titleBox.setName("title");
titleBox.setTextContent("this is title");
//validate
Textbox tbox = slide.getTextboxByName("title");
Assert.assertEquals(titleBox, tbox);
slide.removeTextbox(titleBox);
Textbox tbox1 = slide.getTextboxByName("title");
Assert.assertNull(tbox1);
//save
pDoc.save(ResourceUtilities.newTestOutputFile("imagep.odp"));
} catch (Exception e) {