class BBInputSetupUtils {

    public org.onap.aai.domain.yang.ServiceInstance getAAIServiceInstanceByName(String serviceInstanceName,
            Customer customer) throws Exception {
        Optional<org.onap.aai.domain.yang.ServiceInstance> aaiServiceInstance = injectionHelper.getAaiClient().getOne(
                ServiceInstances.class, org.onap.aai.domain.yang.ServiceInstance.class,
                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.business().customer(customer.getGlobalCustomerId())
                        .serviceSubscription(customer.getServiceSubscription().getServiceType()).serviceInstances())
                        .queryParam("service-instance-name", serviceInstanceName).depth(Depth.TWO));

        return aaiServiceInstance.orElse(null);
    }

}