BeanCatalogService implements CatalogService { @Override public Mono<ServiceDefinition> getServiceDefinition(final String serviceId) { return Mono.justOrEmpty(serviceDefs.get(serviceId)); } BeanCatalogService(Catalog catalog); @Override Mono<Catalog> getCatalog(); @Override Mono<ServiceDefinition> getServiceDefinition(final String serviceId);  }
@Test public void serviceDefinitionIsFound() { assertThat(service.getServiceDefinition(SVC_DEF_ID).block()).isEqualTo(serviceDefinition); }
@Test public void serviceDefinitionIsNotFound() { assertThat(service.getServiceDefinition("NOT_THERE").block()).isNull(); }