use of org.springframework.cloud.servicebroker.model.binding.DeleteServiceInstanceBindingResponse in project spring-cloud-open-service-broker by spring-cloud.
the class ServiceInstanceBindingControllerResponseCodeTest method deleteServiceBindingWithMissingBindingGivesExpectedStatus.
@Test
void deleteServiceBindingWithMissingBindingGivesExpectedStatus() {
given(bindingService.deleteServiceInstanceBinding(any(DeleteServiceInstanceBindingRequest.class))).willThrow(new ServiceInstanceBindingDoesNotExistException("binding-id"));
ResponseEntity<DeleteServiceInstanceBindingResponse> responseEntity = controller.deleteServiceInstanceBinding(pathVariables, null, null, "service-definition-id", "service-definition-plan-id", false, null, null, null).block();
assertThat(responseEntity).isNotNull();
assertThat(responseEntity.getStatusCode()).isEqualTo(HttpStatus.GONE);
}
Aggregations