@Test public void create1() { FactoryOptions options = new FactoryOptions( singletonMap(HeaderDescriptionRequiredValidator.CONFIG_KEY, "true")); List<HeaderValidator> validators = validatorFactory.create(options); assertThat(validators).hasSize(2); assertThat(validators).hasOnlyElementsOfTypes( HeaderSchemaValidator.class, HeaderDescriptionRequiredValidator.class ); }
@Override public List<HeaderValidator> create(FactoryOptions options) { List<HeaderValidator> validators = new ArrayList<>(); validators.add(new HeaderSchemaValidator(schemaValidatorFactory.create(options))); addHeaderDescriptionRequiredValidator(validators, options); return Collections.unmodifiableList(validators); }
DefaultHeaderValidatorFactory implements HeaderValidatorFactory { @Override public List<HeaderValidator> create(FactoryOptions options) { List<HeaderValidator> validators = new ArrayList<>(); validators.add(new HeaderSchemaValidator(schemaValidatorFactory.create(options))); addHeaderDescriptionRequiredValidator(validators, options); return Collections.unmodifiableList(validators); } }
DefaultHeaderValidatorFactory implements HeaderValidatorFactory { @Override public List<HeaderValidator> create(FactoryOptions options) { List<HeaderValidator> validators = new ArrayList<>(); validators.add(new HeaderSchemaValidator(schemaValidatorFactory.create(options))); addHeaderDescriptionRequiredValidator(validators, options); return Collections.unmodifiableList(validators); } DefaultHeaderValidatorFactory(
      SchemaValidatorFactory schemaValidatorFactory); }
DefaultHeaderValidatorFactory implements HeaderValidatorFactory { @Override public List<HeaderValidator> create(FactoryOptions options) { List<HeaderValidator> validators = new ArrayList<>(); validators.add(new HeaderSchemaValidator(schemaValidatorFactory.create(options))); addHeaderDescriptionRequiredValidator(validators, options); return Collections.unmodifiableList(validators); } DefaultHeaderValidatorFactory(
      SchemaValidatorFactory schemaValidatorFactory); @Override List<HeaderValidator> create(FactoryOptions options); }
DefaultHeaderValidatorFactory implements HeaderValidatorFactory { @Override public List<HeaderValidator> create(FactoryOptions options) { List<HeaderValidator> validators = new ArrayList<>(); validators.add(new HeaderSchemaValidator(schemaValidatorFactory.create(options))); addHeaderDescriptionRequiredValidator(validators, options); return Collections.unmodifiableList(validators); } DefaultHeaderValidatorFactory(
      SchemaValidatorFactory schemaValidatorFactory); @Override List<HeaderValidator> create(FactoryOptions options);  }