### Question:
BoldRule implements InlineRule { @Override public MarkdownString toMarkdownString(String pContent) { Matcher matcher = getRegex().matcher(pContent); String content = ""; if (matcher.find()) { content = matcher.group(2); } return new BoldString(content, true); } BoldRule(final String pPattern); @Override Pattern getRegex(); @Override MarkdownString toMarkdownString(String pContent); final static String PATTERN_ASTERISK; final static String PATTERN_UNDERSCORE; }### Answer:
@Test public void shouldCreateBoldString() { assertEquals("text", mBoldRule.toMarkdownString("__text__").getContent()); }
@Test public void shouldNotCreateBoldString() { assertNotEquals("text", mBoldRule.toMarkdownString("$$text$$").getContent()); }