ctComment.setRef("C10");
assertEquals(9, comment.getRow());
}
public void testGetAuthor() throws Exception {
CommentsDocument doc = CommentsDocument.Factory.newInstance();
CTComments ctComments = CTComments.Factory.newInstance();
CTComment ctComment = ctComments.addNewCommentList().addNewComment();
CTAuthors ctAuthors = ctComments.addNewAuthors();
ctAuthors.insertAuthor(0, TEST_AUTHOR);
ctComment.setAuthorId(0);
doc.setComments(ctComments);
ByteArrayOutputStream out = new ByteArrayOutputStream();
doc.save(out, POIXMLDocumentPart.DEFAULT_XML_OPTIONS);
CommentsTable sheetComments = new CommentsTable();
sheetComments.readFrom(new ByteArrayInputStream(out.toByteArray()));
XSSFComment comment = new XSSFComment(sheetComments, ctComment);
assertEquals(TEST_AUTHOR, comment.getAuthor());