### Question:
BBInputSetup implements JavaDelegate { protected void addRelationshipsToSI(org.onap.aai.domain.yang.ServiceInstance serviceInstanceAAI, ServiceInstance serviceInstance) throws Exception { AAIResultWrapper serviceInstanceWrapper = new AAIResultWrapper( new AAICommonObjectMapperProvider().getMapper().writeValueAsString(serviceInstanceAAI)); Optional<Relationships> relationshipsOp = serviceInstanceWrapper.getRelationships(); if (relationshipsOp.isPresent()) { mapRelationship(serviceInstance, relationshipsOp.get()); } }  BBInputSetupUtils getBbInputSetupUtils(); void setCloudInfoFromAAI(CloudInfoFromAAI cloudInfoFromAAI); void setBbInputSetupUtils(BBInputSetupUtils bbInputSetupUtils); BBInputSetupMapperLayer getMapperLayer(); void setMapperLayer(BBInputSetupMapperLayer mapperLayer); @Override void execute(DelegateExecution execution); ServiceInstance getExistingServiceInstance(org.onap.aai.domain.yang.ServiceInstance serviceInstanceAAI);  }### Answer:
@Test public void testAddRelationshipsToSI() throws Exception { ServiceInstance serviceInstance = new ServiceInstance(); org.onap.aai.domain.yang.ServiceInstance serviceInstanceAAI = new org.onap.aai.domain.yang.ServiceInstance(); serviceInstanceAAI.setServiceInstanceId("serviceInstanceId"); org.onap.aai.domain.yang.RelationshipList relationshipList = new org.onap.aai.domain.yang.RelationshipList(); org.onap.aai.domain.yang.Relationship relationship = new org.onap.aai.domain.yang.Relationship(); relationshipList.getRelationship().add(relationship); serviceInstanceAAI.setRelationshipList(relationshipList); Map<String, String> uriKeys = new HashMap<>(); uriKeys.put("global-customer-id", "globalCustomerId"); uriKeys.put("service-type", "serviceType"); doNothing().when(SPY_bbInputSetup).mapProject(any(), eq(serviceInstance)); doNothing().when(SPY_bbInputSetup).mapOwningEntity(any(), eq(serviceInstance)); doNothing().when(SPY_bbInputSetup).mapL3Networks(any(), eq(serviceInstance.getNetworks())); doNothing().when(SPY_bbInputSetup).mapGenericVnfs(any(), eq(serviceInstance.getVnfs())); doNothing().when(SPY_bbInputSetup).mapCollection(any(), eq(serviceInstance)); SPY_bbInputSetup.addRelationshipsToSI(serviceInstanceAAI, serviceInstance); verify(SPY_bbInputSetup, times(1)).mapProject(any(), eq(serviceInstance)); verify(SPY_bbInputSetup, times(1)).mapOwningEntity(any(), eq(serviceInstance)); verify(SPY_bbInputSetup, times(1)).mapL3Networks(any(), eq(serviceInstance.getNetworks())); verify(SPY_bbInputSetup, times(1)).mapGenericVnfs(any(), eq(serviceInstance.getVnfs())); verify(SPY_bbInputSetup, times(1)).mapCollection(any(), eq(serviceInstance)); verify(SPY_bbInputSetup, times(1)).mapConfigurations(any(), eq(serviceInstance.getConfigurations())); }