use of org.springframework.cloud.servicebroker.model.catalog.ServiceDefinition in project spring-cloud-open-service-broker by spring-cloud.
the class ServiceInstanceControllerResponseCodeTest method setUp.
@BeforeEach
void setUp() {
controller = new ServiceInstanceController(catalogService, serviceInstanceService);
ServiceDefinition serviceDefinition = mock(ServiceDefinition.class);
List<Plan> plans = new ArrayList<>();
plans.add(Plan.builder().id("service-definition-plan-id").build());
given(serviceDefinition.getPlans()).willReturn(plans);
given(serviceDefinition.getId()).willReturn("service-definition-id");
given(catalogService.getServiceDefinition(any())).willReturn(Mono.just(serviceDefinition));
}
Aggregations