assertEquals(TEST_RICHTEXTSTRING, comment.getString().getString());
//if the text is already set, it should be overridden, not added twice!
comment.setString(TEST_RICHTEXTSTRING);
CTComment ctComment = comment.getCTComment();
XmlObject[] obj = ctComment.selectPath(
"declare namespace w='http://schemas.openxmlformats.org/spreadsheetml/2006/main' .//w:text");
assertEquals(1, obj.length);
assertEquals(TEST_RICHTEXTSTRING, comment.getString().getString());
//sequential call of comment.getString() should return the same XSSFRichTextString object
assertSame(comment.getString(), comment.getString());
XSSFRichTextString richText = new XSSFRichTextString(TEST_RICHTEXTSTRING);
XSSFFont font1 = wb.createFont();
font1.setFontName("Tahoma");
font1.setFontHeight(8.5);
font1.setItalic(true);
font1.setColor(IndexedColors.BLUE_GREY.getIndex());
richText.applyFont(0, 5, font1);
//check the low-level stuff
comment.setString(richText);
obj = ctComment.selectPath(
"declare namespace w='http://schemas.openxmlformats.org/spreadsheetml/2006/main' .//w:text");
assertEquals(1, obj.length);
assertSame(comment.getString(), richText);
//check that the rich text is set in the comment
CTRPrElt rPr = richText.getCTRst().getRArray(0).getRPr();