use of org.springframework.cloud.servicebroker.exception.ServiceInstanceBindingDoesNotExistException in project spring-cloud-open-service-broker by spring-cloud.
the class ServiceInstanceBindingControllerResponseCodeTest method getServiceBindingWithMissingBindingGivesExpectedStatus.
@Test
void getServiceBindingWithMissingBindingGivesExpectedStatus() {
given(bindingService.getServiceInstanceBinding(any(GetServiceInstanceBindingRequest.class))).willThrow(new ServiceInstanceBindingDoesNotExistException("binding-id"));
ResponseEntity<GetServiceInstanceBindingResponse> responseEntity = controller.getServiceInstanceBinding(pathVariables, null, null, null, null, null, null, null).block();
assertThat(responseEntity).isNotNull();
assertThat(responseEntity.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND);
}
Aggregations