class 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;
    }

}