@SuppressWarnings("StatementWithEmptyBody") @Test public void addCellProcessorHeader() throws IOException { CellProcessor processor = when(mock(CellProcessor.class).processHeader()).thenReturn(true).getMock(); when(processor.process("col1")).thenReturn("col1"); when(processor.process("col2")).thenReturn("col2"); try (CsvRepository csvRepository = new CsvRepository(test, entityTypeFactory, attrMetaFactory, null)) { csvRepository.addCellProcessor(processor); for (@SuppressWarnings("unused") Entity entity : csvRepository) {} verify(processor).process("col1"); verify(processor).process("col2"); } }
public void addCellProcessor(CellProcessor cellProcessor) { if (cellProcessors == null) cellProcessors = new ArrayList<>(); cellProcessors.add(cellProcessor); }
CsvRepository extends AbstractRepository { public void addCellProcessor(CellProcessor cellProcessor) { if (cellProcessors == null) cellProcessors = new ArrayList<>(); cellProcessors.add(cellProcessor); } }
CsvRepository extends AbstractRepository { public void addCellProcessor(CellProcessor cellProcessor) { if (cellProcessors == null) cellProcessors = new ArrayList<>(); cellProcessors.add(cellProcessor); } CsvRepository(
      File file,
      EntityTypeFactory entityTypeFactory,
      AttributeFactory attrMetaFactory,
      @Nullable @CheckForNull List<CellProcessor> cellProcessors,
      Character separator);  CsvRepository(
      File file,
      EntityTypeFactory entityTypeFactory,
      AttributeFactory attrMetaFactory,
      @Nullable @CheckForNull List<CellProcessor> cellProcessors);  CsvRepository(
      File file,
      EntityTypeFactory entityTypeFactory,
      AttributeFactory attrMetaFactory,
      String sheetName,
      @Nullable @CheckForNull List<CellProcessor> cellProcessors); }
CsvRepository extends AbstractRepository { public void addCellProcessor(CellProcessor cellProcessor) { if (cellProcessors == null) cellProcessors = new ArrayList<>(); cellProcessors.add(cellProcessor); } CsvRepository(
      File file,
      EntityTypeFactory entityTypeFactory,
      AttributeFactory attrMetaFactory,
      @Nullable @CheckForNull List<CellProcessor> cellProcessors,
      Character separator);  CsvRepository(
      File file,
      EntityTypeFactory entityTypeFactory,
      AttributeFactory attrMetaFactory,
      @Nullable @CheckForNull List<CellProcessor> cellProcessors);  CsvRepository(
      File file,
      EntityTypeFactory entityTypeFactory,
      AttributeFactory attrMetaFactory,
      String sheetName,
      @Nullable @CheckForNull List<CellProcessor> cellProcessors); @NotNull @Override Iterator<Entity> iterator(); EntityType getEntityType(); void addCellProcessor(CellProcessor cellProcessor); @Override Set<RepositoryCapability> getCapabilities(); @Override long count(); }
CsvRepository extends AbstractRepository { public void addCellProcessor(CellProcessor cellProcessor) { if (cellProcessors == null) cellProcessors = new ArrayList<>(); cellProcessors.add(cellProcessor); } CsvRepository(
      File file,
      EntityTypeFactory entityTypeFactory,
      AttributeFactory attrMetaFactory,
      @Nullable @CheckForNull List<CellProcessor> cellProcessors,
      Character separator);  CsvRepository(
      File file,
      EntityTypeFactory entityTypeFactory,
      AttributeFactory attrMetaFactory,
      @Nullable @CheckForNull List<CellProcessor> cellProcessors);  CsvRepository(
      File file,
      EntityTypeFactory entityTypeFactory,
      AttributeFactory attrMetaFactory,
      String sheetName,
      @Nullable @CheckForNull List<CellProcessor> cellProcessors); @NotNull @Override Iterator<Entity> iterator(); EntityType getEntityType(); void addCellProcessor(CellProcessor cellProcessor); @Override Set<RepositoryCapability> getCapabilities(); @Override long count();  }