### Question:
AbstractMultiTagParser { public List<T> parse(final List<String> documentation) { if (documentation == null) { throw new IllegalArgumentException("Documentation list cannot be null."); } final EtmPoint point = PointFactory.getPoint(getClass(), "parse(List)"); try { final List<T> parsed = new LinkedList<T>(); for (int i = 0, size = documentation.size(); i < size; i++) { final String currentLine = documentation.get(i); if (isParseable(currentLine)) { final DocumentationTagIndexedSmoosher indexedSmoosher = new DocumentationTagIndexedSmoosher(); parsed.add(parseElement(indexedSmoosher.smoosh(i, documentation))); final int endingIndex = indexedSmoosher.getEndingIndex(); if (endingIndex > i) { i = endingIndex - 1; } } } return parsed; } finally { point.collect(); } }  List<T> parse(final List<String> documentation);  }### Answer:
@Test public void testParse() { final List<String> lines = Arrays.asList("parse:one", "parse:two", "parse:skipped", "not_parseable", "parse:three"); int listIdx = -1; for (final String line : lines) { listIdx++; if (line.startsWith("parse:")) { final String parsed = line + "-parsed"; when(smoosher.smoosh(listIdx, lines)).thenReturn(parsed); parser.addParseable(parsed, parsed + "-product"); } } when(smoosher.getEndingIndex()).thenReturn(Integer.valueOf(0), Integer.valueOf(3), Integer.valueOf(3), Integer.valueOf(4)); final List<Object> parsed = parser.parse(lines); assertThat(parsed).containsExactly("parse:one-parsed-product", "parse:two-parsed-product", "parse:three-parsed-product"); }
@Test public void testParseNullDocumentation() { IllegalArgumentException e = assertThrows(IllegalArgumentException.class, () -> { parser.parse(null); }); assertThat(e.getMessage()).isEqualTo("Documentation list cannot be null."); }