Textbox box = p.addTextbox(frameR);
box.setName("tbox name");
box.setTextContent(content);
FrameStyleHandler frameStyleHandler = new FrameStyleHandler(box);
frameStyleHandler.setBackgroundColor(Color.BLUE);
textDoc.changeMode(OdfMediaType.TEXT_TEMPLATE);
frameStyleHandler.setAchorType(StyleTypeDefinitions.AnchorType.TO_PAGE);
//validate
GraphicProperties graphicPropertiesForWrite = frameStyleHandler.getGraphicPropertiesForWrite();
Assert.assertEquals(VerticalRelative.PAGE, graphicPropertiesForWrite.getVerticalRelative());
Assert.assertEquals(FrameVerticalPosition.TOP, graphicPropertiesForWrite.getVerticalPosition());
Assert.assertEquals(HorizontalRelative.PAGE, graphicPropertiesForWrite.getHorizontalRelative());
Assert.assertEquals(FrameHorizontalPosition.CENTER, graphicPropertiesForWrite.getHorizontalPosition());