### Question:
CodeBlockRule implements Rule { @Override public boolean conforms(final List<String> pMarkdownLines) { if (!CODE_PATTERN_START.matcher(pMarkdownLines.get(0)).matches()) { return false; } mLinesConsumed = 0; for (String line : pMarkdownLines) { mLinesConsumed += 1; if (mLinesConsumed == 1) { if (CODE_PATTERN_END_SINGLE_LINE.matcher(line).matches()) { return true; } } else { if (CODE_PATTERN_END.matcher(line).matches()) { return true; } } } return true; }  @Override boolean conforms(final List<String> pMarkdownLines); @Override int getLinesConsumed(); @Override MarkdownItem toMarkdownItem(final List<String> pMarkdownLines);  }### Answer:
@Test public void shouldConformToCodeBlock() { List<String> strings = new ArrayList<>(); strings.add("```"); strings.add("code"); strings.add("```"); assertTrue(mCodeBlockRule.conforms(strings)); }
@Test public void shouldNotConformToCodeBlock() { List<String> strings = new ArrayList<>(); strings.add("***"); strings.add("code"); strings.add("***"); assertFalse(mCodeBlockRule.conforms(strings)); }