### Question:
BackingServicesParametersTransformationService { public Mono<List<BackingService>> transformParameters(List<BackingService> backingServices, Map<String, Object> parameters) { return Flux.fromIterable(backingServices) .flatMap(backingService -> { List<ParametersTransformerSpec> specs = getTransformerSpecsForService(backingService); return Flux.fromIterable(specs) .flatMap(spec -> { ParametersTransformer<BackingService> transformer = locator .getByName(spec.getName(), spec.getArgs()); return transformer.transform(backingService, parameters); }) .then(Mono.just(backingService)); }) .collectList(); } BackingServicesParametersTransformationService(
		List<ParametersTransformerFactory<BackingService, ?>> factories); Mono<List<BackingService>> transformParameters(List<BackingService> backingServices,
		Map<String, Object> parameters);  }### Answer:
@Test void transformParametersWithNoBackingServices() { BackingServicesParametersTransformationService service = new BackingServicesParametersTransformationService(Collections.emptyList()); BackingServices backingServices = BackingServices.builder() .build(); StepVerifier .create(service.transformParameters(backingServices, new HashMap<>())) .expectNext(backingServices) .verifyComplete(); }
@Test void transformParametersWithNoTransformers() { BackingServicesParametersTransformationService service = new BackingServicesParametersTransformationService(Collections.emptyList()); BackingServices backingServices = BackingServices .builder() .backingService(BackingService.builder().build()) .build(); StepVerifier .create(service.transformParameters(backingServices, new HashMap<>())) .expectNext(backingServices) .verifyComplete(); }
@Test void transformParametersWithUnknownTransformer() { BackingServicesParametersTransformationService service = new BackingServicesParametersTransformationService(Collections.emptyList()); BackingServices backingServices = BackingServices .builder() .backingService(BackingService.builder() .name("misconfigured-service") .parameterTransformers(ParametersTransformerSpec .builder() .name("unknown-transformer") .build()) .build()) .build(); StepVerifier .create(service.transformParameters(backingServices, new HashMap<>())) .expectErrorSatisfies(e -> assertThat(e) .isInstanceOf(ServiceBrokerException.class) .hasMessageContaining("unknown-transformer")) .verify(); }