### Question:
NamingServiceDeleteTasks { public void deleteServiceInstanceName(BuildingBlockExecution execution) throws BBObjectNotFoundException { ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID); NamingRequestObject namingRequestObject = new NamingRequestObject(); namingRequestObject.setExternalKeyValue(serviceInstance.getServiceInstanceId()); try { namingServiceResources.deleteServiceInstanceName(namingRequestObject); } catch (Exception ex) { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } }  void deleteInstanceGroupName(BuildingBlockExecution execution); void deleteServiceInstanceName(BuildingBlockExecution execution);  }### Answer:
@Test public void deleteServiceInstanceNameTest() throws Exception { serviceInstance = setServiceInstance(); when(extractPojosForBB.extractByKey(any(), ArgumentMatchers.eq(ResourceKey.SERVICE_INSTANCE_ID))) .thenReturn(serviceInstance); doNothing().when(namingRequestObject).setExternalKeyValue(serviceInstance.getServiceInstanceId()); doReturn("").when(namingServiceResources).deleteServiceInstanceName(namingRequestObject); namingServiceDeleteTasks.deleteServiceInstanceName(execution); verify(namingServiceResources, times(1)).deleteServiceInstanceName(any(NamingRequestObject.class)); }