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