class BBInputSetupMapperLayer {

    protected ModelInfoInstanceGroup mapCatalogInstanceGroupToInstanceGroup(
            CollectionResourceCustomization collectionCust, InstanceGroup instanceGroup) {
        ModelInfoInstanceGroup modelInfoInstanceGroup = modelMapper.map(instanceGroup, ModelInfoInstanceGroup.class);
        if (instanceGroup.getType() != null && instanceGroup.getType().equals(InstanceGroupType.L3_NETWORK))
            modelInfoInstanceGroup.setType(ModelInfoInstanceGroup.TYPE_L3_NETWORK);
        else
            modelInfoInstanceGroup.setType(ModelInfoInstanceGroup.TYPE_VNFC);
        if (collectionCust != null) {
            List<CollectionResourceInstanceGroupCustomization> instanceGroupCustList =
                    instanceGroup.getCollectionInstanceGroupCustomizations();
            for (CollectionResourceInstanceGroupCustomization collectionInsatnceGroupCust : instanceGroupCustList) {
                if (collectionInsatnceGroupCust.getModelCustomizationUUID()
                        .equalsIgnoreCase(collectionCust.getModelCustomizationUUID())) {
                    modelInfoInstanceGroup.setFunction(collectionInsatnceGroupCust.getFunction());
                    modelInfoInstanceGroup.setDescription(collectionInsatnceGroupCust.getDescription());
                    break;
                }
            }
        }
        return modelInfoInstanceGroup;
    }

}