class AAIInstanceGroupResources {

    public void createInstanceGroupandConnectServiceInstance(InstanceGroup instanceGroup,
            ServiceInstance serviceInstance) {
        AAIResourceUri instanceGroupUri =
                AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId()));
        org.onap.aai.domain.yang.InstanceGroup aaiInstanceGroup = aaiObjectMapper.mapInstanceGroup(instanceGroup);
        AAIResourceUri serviceInstanceURI = AAIUriFactory
                .createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstance.getServiceInstanceId()));
        injectionHelper.getAaiClient().createIfNotExists(instanceGroupUri, Optional.of(aaiInstanceGroup))
                .connect(instanceGroupUri, serviceInstanceURI);
    }

}