protected static function dataModelValuesToRuntime(ValueCollection $valueCollection, $baseType, $cardinality)
    {
        // Cardinality?
        // -> Single? Multiple? Ordered? Record?
        if ($cardinality === Cardinality::SINGLE) {
            // We should find a single value in the DefaultValue's values.
            if (count($valueCollection) == 1) {
                $dataModelValue = RuntimeUtils::valueToRuntime($valueCollection[0]->getValue(), $baseType);

                return $dataModelValue;
            } else {
                // The Data Model is in an inconsistent state.
                // This should be handled by the Data Model but
                // I prefer to be defensive.
                $msg = "A Data Model VariableDeclaration with 'single' cardinality must contain a single value, ";
                $msg .= count($valueCollection) . " value(s) found.";
                throw new UnexpectedValueException($msg);
            }
        } else {
            // Multiple|Ordered|Record, use a container.
            $container = null;

            try {
                // Create the appropriate Container object.
                $className = ucfirst(Cardinality::getNameByConstant($cardinality)) . 'Container';
                $nsClassName = 'qtism\\runtime\\common\\' . $className;
                $callback = array($nsClassName , 'createFromDataModel');
                $container = call_user_func_array($callback, array($valueCollection, $baseType));

                return $container; // return container.
            } catch (InvalidArgumentException $e) {
                $msg = "The default value found in the Data Model Variable Declaration is not consistent. ";
                $msg.= "The values must have a baseType compliant with the baseType of the VariableDeclaration.";
                $msg.= "If the VariableDeclaration's cardinality is 'record', make sure the values it contains have ";
                $msg.= "fieldIdentifiers.";

                throw new UnexpectedValueException($msg, 0, $e);
            }
        }
    }