@Test void continuationLineTest() { CobolLine startContinuationLine = new CobolLine(); startContinuationLine.setType(NORMAL); startContinuationLine.setIndicatorArea(WS); startContinuationLine.setContentAreaA(" "); startContinuationLine.setContentAreaB(" \"RANDOM TEXT "); CobolLine middleContinuationLine = new CobolLine(); middleContinuationLine.setType(CONTINUATION); middleContinuationLine.setIndicatorArea("-"); middleContinuationLine.setContentAreaA(" "); middleContinuationLine.setContentAreaB(" \"RANDOM TEXT "); CobolLine lastContinuationLine = new CobolLine(); lastContinuationLine.setType(CONTINUATION); lastContinuationLine.setIndicatorArea("-"); lastContinuationLine.setContentAreaA(" "); lastContinuationLine.setContentAreaB(" \"CONTINUED LINE ENDS HERE\" "); startContinuationLine.setSuccessor(middleContinuationLine); middleContinuationLine.setSuccessor(lastContinuationLine); List<CobolLine> listOfLines = List.of(startContinuationLine, middleContinuationLine, lastContinuationLine); CobolLineIndicatorProcessorImpl processor = new CobolLineIndicatorProcessorImpl(); List<CobolLine> outcomeList = processor.processLines(listOfLines); assertEquals( WS + " \"RANDOM TEXT ", outcomeList.get(0).getIndicatorArea() + outcomeList.get(0).getContentArea()); assertEquals( WS + "RANDOM TEXT ", outcomeList.get(1).getIndicatorArea() + outcomeList.get(1).getContentArea()); assertEquals( WS + "\"CONTINUED LINE ENDS HERE\"", outcomeList.get(2).getIndicatorArea() + outcomeList.get(2).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);  }