JavaLikeMLCommentContainer in = new ICommentContainerInformation.JavaLikeMLCommentContainer(2);
CommentProcessor cp = new CommentProcessor();
CommentFormattingOptions options = new CommentFormattingOptions(
new ICommentFormatterAdvice.DefaultCommentAdvice(), 80);
String source = "/* the\n quick\n *brown\n * fox\n \n \n */ ";
IFormattingContext fmtCtx = get(IFormattingContext.class);
TextFlow s = cp.formatComment(source, in, in, options, fmtCtx);
// pad expected and result with 2 spaces to emulate the inserting of the result
// (makes comparison look nicer if test fails)
String expected = " /* the\n * quick\n * brown\n * fox\n */ ";
assertEquals("Should produce expected result", expected, " " + CharSequences.trimLeft(s.getText()).toString());