### Question:
CobolCommentEntriesMarkerImpl implements CobolLineReWriter { @Override public List<CobolLine> processLines(@Nonnull List<CobolLine> lines) { return lines.stream().map(this::escapeCommentEntry).collect(Collectors.toList()); }  @Override List<CobolLine> processLines(@Nonnull List<CobolLine> lines);  }### Answer:
@Test void testLineWithTriggerEscaped() { CobolLine line = new CobolLine(); line.setSequenceArea(BLANK_SEQUENCE_AREA); line.setIndicatorArea(WS); line.setContentAreaB("AUTHOR. SE."); CobolLine expected = copyCobolLineWithIndicatorAndContentArea(WS, "AUTHOR. " + COMMENT_ENTRY_TAG + " SE.", line); CobolLineReWriter marker = new CobolCommentEntriesMarkerImpl(); assertEquals(expected, marker.processLines(singletonList(line)).get(0)); }
@Test void testLineWithoutTriggersNotChanged() { CobolLine line = new CobolLine(); line.setSequenceArea(BLANK_SEQUENCE_AREA); line.setIndicatorArea(WS); line.setContentAreaA("MOVE"); line.setContentAreaB(" A TO B."); CobolLineReWriter marker = new CobolCommentEntriesMarkerImpl(); assertEquals(line, marker.processLines(singletonList(line)).get(0)); }
@Test void testLineWithTriggerInPreviousLineNotEscaped() { CobolLine line1 = new CobolLine(); line1.setSequenceArea(BLANK_SEQUENCE_AREA); line1.setIndicatorArea(WS); line1.setContentAreaB("AUTHOR. SE."); CobolLine line2 = new CobolLine(); line2.setSequenceArea(BLANK_SEQUENCE_AREA); line2.setIndicatorArea(WS); line2.setContentAreaA("MOVE"); line2.setContentAreaB(" A TO B."); line2.setPredecessor(line1); CobolLine expected = copyCobolLineWithIndicatorAndContentArea( WS, "AUTHOR. " + COMMENT_ENTRY_TAG + " SE.", line1); CobolLineReWriter marker = new CobolCommentEntriesMarkerImpl(); List<CobolLine> processedLines = marker.processLines(List.of(line1, line2)); assertEquals(expected, processedLines.get(0)); assertEquals(line2, processedLines.get(1)); }