TableInfoFactory { public List<TableInfo> createFromRelationalInputs( final Collection<RelationalInputGenerator> generators) throws InputGenerationException { final List<TableInfo> result = new ArrayList<>(); if (generators != null) { for (final RelationalInputGenerator generator : generators) { try (RelationalInput input = generator.generateNewCopy()) { result.add(createFrom(generator, input)); } catch (final Exception e) { throw new InputGenerationException("relational input", e); } } } return result; }  List<TableInfo> create(
      final Collection<RelationalInputGenerator> relationalInputGenerators,
      final Collection<TableInputGenerator> tableInputGenerators); List<TableInfo> createFromRelationalInputs(
      final Collection<RelationalInputGenerator> generators); List<TableInfo> createFromTableInputs(
      final Collection<TableInputGenerator> generators);  }
@Test void collectFromRelationalSource() throws Exception { final RelationalInput input1 = RelationalInputStub.builder() .relationName("Test") .columnName("A").columnName("B") .build(); given(generator.generateNewCopy()).willReturn(input1); final List<TableInfo> info = factory.createFromRelationalInputs(asList(generator)); assertThat(info).hasSize(1); final TableInfo info1 = info.get(0); assertThat(info1.getColumnNames()).contains("A", "B"); assertThat(info1.getColumnTypes()).containsOnly("String"); }