### Question:
CreateNetworkCollection { public void connectCollectionToInstanceGroup(BuildingBlockExecution execution) throws Exception { execution.setVariable("connectCollectionToInstanceGroupRollback", false); try { ServiceInstance serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID); Collection networkCollection = serviceInstance.getCollection(); aaiNetworkResources.connectNetworkCollectionInstanceGroupToNetworkCollection( networkCollection.getInstanceGroup(), networkCollection); execution.setVariable("connectCollectionToInstanceGroupRollback", true); } catch (Exception ex) { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex); } }  void buildNetworkCollectionName(BuildingBlockExecution execution); void connectCollectionToInstanceGroup(BuildingBlockExecution execution); void connectInstanceGroupToCloudRegion(BuildingBlockExecution execution); void connectCollectionToServiceInstance(BuildingBlockExecution execution);  }### Answer:
@Test public void connectCollectionToInstanceGroupTest() throws Exception { doNothing().when(aaiNetworkResources).connectNetworkCollectionInstanceGroupToNetworkCollection( serviceInstance.getCollection().getInstanceGroup(), serviceInstance.getCollection()); createNetworkCollection.connectCollectionToInstanceGroup(execution); verify(aaiNetworkResources, times(1)).connectNetworkCollectionInstanceGroupToNetworkCollection( serviceInstance.getCollection().getInstanceGroup(), serviceInstance.getCollection()); }