### Question:
ListRule implements Rule { @Override public boolean conforms(final List<String> pMarkdownLines) { if (!ORDERED_LIST_PATTERN.matcher(pMarkdownLines.get(0)).matches() && !UNORDERED_LIST_PATTERN.matcher(pMarkdownLines.get(0)).matches()) { return false; } mLinesConsumed = 0; for (String line : pMarkdownLines) { if (isList(line)) { mLinesConsumed++; } else { 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 shouldConformToList() { List<String> strings = new ArrayList<>(); strings.add("1. Number 1"); assertTrue(mListRule.conforms(strings)); strings.clear(); strings.add("- Number 1"); assertTrue(mListRule.conforms(strings)); }
@Test public void shouldNotConformToList() { List<String> strings = new ArrayList<>(); strings.add("#. Number 1"); assertFalse(mListRule.conforms(strings)); }