@Test public void create1() { FactoryOptions options = new FactoryOptions( singletonMap(RequestBodyDescriptionRequiredValidator.CONFIG_KEY, "true")); List<RequestBodyValidator> validators = validatorFactory.create(options); assertThat(validators).hasSize(2); assertThat(validators).hasOnlyElementsOfTypes( RequestBodyContentValidator.class, RequestBodyDescriptionRequiredValidator.class ); }
@Override public List<RequestBodyValidator> create(FactoryOptions options) { List<RequestBodyValidator> validators = new ArrayList<>(); validators.add(new RequestBodyContentValidator(mediaTypeValidatorFactory.create(options))); addRequestBodyDescriptionRequiredValidator(validators, options); return Collections.unmodifiableList(validators); }
DefaultRequestBodyValidatorFactory implements RequestBodyValidatorFactory { @Override public List<RequestBodyValidator> create(FactoryOptions options) { List<RequestBodyValidator> validators = new ArrayList<>(); validators.add(new RequestBodyContentValidator(mediaTypeValidatorFactory.create(options))); addRequestBodyDescriptionRequiredValidator(validators, options); return Collections.unmodifiableList(validators); } }
DefaultRequestBodyValidatorFactory implements RequestBodyValidatorFactory { @Override public List<RequestBodyValidator> create(FactoryOptions options) { List<RequestBodyValidator> validators = new ArrayList<>(); validators.add(new RequestBodyContentValidator(mediaTypeValidatorFactory.create(options))); addRequestBodyDescriptionRequiredValidator(validators, options); return Collections.unmodifiableList(validators); } DefaultRequestBodyValidatorFactory(
      MediaTypeValidatorFactory mediaTypeValidatorFactory); }
DefaultRequestBodyValidatorFactory implements RequestBodyValidatorFactory { @Override public List<RequestBodyValidator> create(FactoryOptions options) { List<RequestBodyValidator> validators = new ArrayList<>(); validators.add(new RequestBodyContentValidator(mediaTypeValidatorFactory.create(options))); addRequestBodyDescriptionRequiredValidator(validators, options); return Collections.unmodifiableList(validators); } DefaultRequestBodyValidatorFactory(
      MediaTypeValidatorFactory mediaTypeValidatorFactory); @Override List<RequestBodyValidator> create(FactoryOptions options); }
DefaultRequestBodyValidatorFactory implements RequestBodyValidatorFactory { @Override public List<RequestBodyValidator> create(FactoryOptions options) { List<RequestBodyValidator> validators = new ArrayList<>(); validators.add(new RequestBodyContentValidator(mediaTypeValidatorFactory.create(options))); addRequestBodyDescriptionRequiredValidator(validators, options); return Collections.unmodifiableList(validators); } DefaultRequestBodyValidatorFactory(
      MediaTypeValidatorFactory mediaTypeValidatorFactory); @Override List<RequestBodyValidator> create(FactoryOptions options);  }