@Test void trailingCommaContinuationLineTest() { CobolLine startContinuationLine = new CobolLine(); startContinuationLine.setType(NORMAL); startContinuationLine.setIndicatorArea(WS); startContinuationLine.setContentAreaA(" "); startContinuationLine.setContentAreaB(" \"RANDOM TEXT "); CobolLine trailingCommaContinuationLine = new CobolLine(); trailingCommaContinuationLine.setType(CONTINUATION); trailingCommaContinuationLine.setIndicatorArea("-"); trailingCommaContinuationLine.setContentAreaA(" "); trailingCommaContinuationLine.setContentAreaB(" ,"); startContinuationLine.setSuccessor(trailingCommaContinuationLine); trailingCommaContinuationLine.setPredecessor(startContinuationLine); List<CobolLine> listOfLines = List.of(startContinuationLine, trailingCommaContinuationLine); CobolLineIndicatorProcessorImpl processor = new CobolLineIndicatorProcessorImpl(); List<CobolLine> outcomeList = processor.processLines(listOfLines); assertEquals( WS + " \"RANDOM TEXT ", outcomeList.get(0).getIndicatorArea() + outcomeList.get(0).getContentArea()); assertEquals( WS + " ," + WS, outcomeList.get(1).getIndicatorArea() + outcomeList.get(1).getContentArea()); }
@Override public List<CobolLine> processLines(final List<CobolLine> lines) { return lines.stream().map(this::processLine).collect(Collectors.toList()); }
CobolLineIndicatorProcessorImpl implements CobolLineIndicatorProcessor { @Override public List<CobolLine> processLines(final List<CobolLine> lines) { return lines.stream().map(this::processLine).collect(Collectors.toList()); } }
CobolLineIndicatorProcessorImpl implements CobolLineIndicatorProcessor { @Override public List<CobolLine> processLines(final List<CobolLine> lines) { return lines.stream().map(this::processLine).collect(Collectors.toList()); }  }
CobolLineIndicatorProcessorImpl implements CobolLineIndicatorProcessor { @Override public List<CobolLine> processLines(final List<CobolLine> lines) { return lines.stream().map(this::processLine).collect(Collectors.toList()); }  @Override List<CobolLine> processLines(final List<CobolLine> lines); @Override CobolLine processLine(final CobolLine line); }
CobolLineIndicatorProcessorImpl implements CobolLineIndicatorProcessor { @Override public List<CobolLine> processLines(final List<CobolLine> lines) { return lines.stream().map(this::processLine).collect(Collectors.toList()); }  @Override List<CobolLine> processLines(final List<CobolLine> lines); @Override CobolLine processLine(final CobolLine line);  }