### Question:
AAIInstanceGroupResources { public void connectInstanceGroupToVnf(InstanceGroup instanceGroup, GenericVnf vnf) { AAIResourceUri instanceGroupUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId())); AAIResourceUri vnfURI = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId())); injectionHelper.getAaiClient().connect(instanceGroupUri, vnfURI); }  void createInstanceGroup(InstanceGroup instanceGroup); void deleteInstanceGroup(InstanceGroup instanceGroup); void connectInstanceGroupToVnf(InstanceGroup instanceGroup, GenericVnf vnf); void connectInstanceGroupToVnf(InstanceGroup instanceGroup, GenericVnf vnf, AAIEdgeLabel aaiLabel); boolean exists(InstanceGroup instanceGroup); void createInstanceGroupandConnectServiceInstance(InstanceGroup instanceGroup,
            ServiceInstance serviceInstance); boolean checkInstanceGroupNameInUse(String instanceGroupName);  }### Answer:
@Test public void connectInstanceGroupTest() throws Exception { aaiInstanceGroupResources.connectInstanceGroupToVnf(instanceGroup, vnf); verify(MOCK_aaiResourcesClient, times(1)).connect( eq(AAIUriFactory .createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId()))), eq(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId())))); }
@Test public void connectInstanceGroupWithEdgeTest() throws Exception { aaiInstanceGroupResources.connectInstanceGroupToVnf(instanceGroup, vnf, AAIEdgeLabel.BELONGS_TO); verify(MOCK_aaiResourcesClient, times(1)).connect( eq(AAIUriFactory .createResourceUri(AAIFluentTypeBuilder.network().instanceGroup(instanceGroup.getId()))), eq(AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnf.getVnfId()))), eq(AAIEdgeLabel.BELONGS_TO)); }