### Question:
BBInputSetup implements JavaDelegate { public ServiceInstance getExistingServiceInstance(org.onap.aai.domain.yang.ServiceInstance serviceInstanceAAI) throws Exception { ServiceInstance serviceInstance = mapperLayer.mapAAIServiceInstanceIntoServiceInstance(serviceInstanceAAI); if (serviceInstanceAAI.getRelationshipList() != null && serviceInstanceAAI.getRelationshipList().getRelationship() != null && !serviceInstanceAAI.getRelationshipList().getRelationship().isEmpty()) { addRelationshipsToSI(serviceInstanceAAI, serviceInstance); } return serviceInstance; }  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 testGetExistingServiceInstance() throws Exception { org.onap.aai.domain.yang.ServiceInstance serviceInstanceAAI = new org.onap.aai.domain.yang.ServiceInstance(); ServiceInstance expected = new ServiceInstance(); doReturn(expected).when(bbInputSetupMapperLayer).mapAAIServiceInstanceIntoServiceInstance(serviceInstanceAAI); ServiceInstance actual = SPY_bbInputSetup.getExistingServiceInstance(serviceInstanceAAI); assertThat(actual, sameBeanAs(expected)); }