class AAIServiceInstanceResources {

    public void createOwningEntityandConnectServiceInstance(OwningEntity owningEntity,
            ServiceInstance serviceInstance) {
        AAIResourceUri owningEntityURI = AAIUriFactory
                .createResourceUri(AAIFluentTypeBuilder.business().owningEntity(owningEntity.getOwningEntityId()));
        AAIResourceUri serviceInstanceURI = AAIUriFactory
                .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance.getServiceInstanceId()));
        org.onap.aai.domain.yang.OwningEntity aaiOwningEntity = aaiObjectMapper.mapOwningEntity(owningEntity);
        injectionHelper.getAaiClient().createIfNotExists(owningEntityURI, Optional.of(aaiOwningEntity))
                .connect(owningEntityURI, serviceInstanceURI);
    }

}