### Question:
IncludeDocumentationFactory implements TopLevelDocumentationFactory<IncludeDocumentation> { @Override public boolean canParse(final int currentIndex, final List<String> source) { boolean canParse = true; if (currentIndex > 0) { for (int i = currentIndex - 1; canParse && i >= 0; i--) { final String line = source.get(i); canParse &= (StringUtils.startsWithIgnoreCase(line, "%#define ") || StringUtils.startsWithIgnoreCase(line, "%#def ") || StringUtils.startsWithIgnoreCase(line, "%#ifndef ") || StringUtils.isBlank(line)); } } return canParse && StringUtils.startsWith(source.get(currentIndex), "/**"); } IncludeDocumentationFactory();  IncludeDocumentationFactory(final DocumentationBlockIndexedSmoosher smoosher); @Override boolean canParse(final int currentIndex, final List<String> source); @Override int getEndingIndex(); @Override IncludeDocumentation parse(final int currentIndex, final List<String> source);  }### Answer:
@Test public void testCannotParse() { final List<String> source = Arrays.asList("; blah blah", ""); assertThat(factory.canParse(1, source)).isFalse(); }
@Test public void testCanParseWithDefinitions() { final List<String> source = Arrays.asList("%#ifndef TEST", "%#define TEST", "%#ifndef TEST2", "%#def TEST2", " ", ""); assertThat(factory.canParse(5, source)).isTrue(); }
@Test public void testCanParseZeroLine() { final List<String> source = Arrays.asList(""); assertThat(factory.canParse(0, source)).isTrue(); }