@Test public void parse_mix_textAndValueAndLink() { List<CommentElement> elements = CommentParser.parse("TestClass", "text before {@value #member1} text after {@link ClassName#member2} more text after").getElements(); assertEquals(5, elements.size()); assertEquals(new CommentText("text before "), elements.get(0)); assertEquals(new InlineValue(new Value("TestClass", "member1")), elements.get(1)); assertEquals(new CommentText(" text after "), elements.get(2)); assertEquals(new InlineLink(new Link("ClassName#member2", "ClassName", "member2", null)), elements.get(3)); assertEquals(new CommentText(" more text after"), elements.get(4)); }
static Comment parse(String owningClass, String commentText) { return isBlank(commentText) ? Comment.createEmpty() : new Comment(parseElements(owningClass, commentText.trim())); }
CommentParser { static Comment parse(String owningClass, String commentText) { return isBlank(commentText) ? Comment.createEmpty() : new Comment(parseElements(owningClass, commentText.trim())); } }
CommentParser { static Comment parse(String owningClass, String commentText) { return isBlank(commentText) ? Comment.createEmpty() : new Comment(parseElements(owningClass, commentText.trim())); }  }
CommentParser { static Comment parse(String owningClass, String commentText) { return isBlank(commentText) ? Comment.createEmpty() : new Comment(parseElements(owningClass, commentText.trim())); }   }
CommentParser { static Comment parse(String owningClass, String commentText) { return isBlank(commentText) ? Comment.createEmpty() : new Comment(parseElements(owningClass, commentText.trim())); }    }