### Question:
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);  }### Answer:
@Test public void create() { FactoryOptions options = new FactoryOptions(emptyMap()); List<HeaderValidator> validators = validatorFactory.create(options); assertThat(validators).hasSize(1); assertThat(validators).hasOnlyElementsOfTypes( HeaderSchemaValidator.class ); }
@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 ); }
@Test public void create2() { FactoryOptions options = new FactoryOptions( singletonMap(HeaderDescriptionRequiredValidator.CONFIG_KEY, "false")); List<HeaderValidator> validators = validatorFactory.create(options); assertThat(validators).hasSize(1); assertThat(validators).hasOnlyElementsOfTypes( HeaderSchemaValidator.class ); }