### Question:
AAIServiceInstanceResources { public void deleteServiceInstance(ServiceInstance serviceInstance) { AAIResourceUri serviceInstanceURI = AAIUriFactory .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance.getServiceInstanceId())); injectionHelper.getAaiClient().delete(serviceInstanceURI); }  boolean existsServiceInstance(ServiceInstance serviceInstance); void createServiceInstance(ServiceInstance serviceInstance, Customer customer); void createServiceSubscription(Customer customer); void deleteServiceInstance(ServiceInstance serviceInstance); void createProject(Project project); void createProjectandConnectServiceInstance(Project project, ServiceInstance serviceInstance); void createOwningEntity(OwningEntity owningEntity); boolean existsOwningEntity(OwningEntity owningEntity); boolean existsOwningEntityName(String owningEntityName); org.onap.aai.domain.yang.OwningEntity getOwningEntityByName(String owningEntityName); void connectOwningEntityandServiceInstance(OwningEntity owningEntity, ServiceInstance serviceInstance); void createOwningEntityandConnectServiceInstance(OwningEntity owningEntity,
            ServiceInstance serviceInstance); void updateOrchestrationStatusServiceInstance(ServiceInstance serviceInstance,
            OrchestrationStatus orchestrationStatus); void updateServiceInstance(ServiceInstance serviceInstance); boolean checkInstanceServiceNameInUse(ServiceInstance serviceInstance);  }### Answer:
@Test public void deleteServiceInstanceSuccessTest() throws Exception { aaiServiceInstanceResources.deleteServiceInstance(serviceInstance); verify(MOCK_aaiResourcesClient, times(1)).delete(any(AAIResourceUri.class)); }
@Test public void deleteServiceInstanceExceptionTest() throws Exception { expectedException.expect(Exception.class); doThrow(Exception.class).when(MOCK_aaiResourcesClient).delete(isA(AAIResourceUri.class)); aaiServiceInstanceResources.deleteServiceInstance(serviceInstance); }