public static function createFromDataModel(VariableDeclaration $variableDeclaration)
    {
        $variable = parent::createFromDataModel($variableDeclaration);

        if ($variableDeclaration instanceof ResponseDeclaration) {

            $variable->setMapping($variableDeclaration->getMapping());
            $variable->setAreaMapping($variableDeclaration->getAreaMapping());

            $dataModelCorrectResponse = $variableDeclaration->getCorrectResponse();
            if (!empty($dataModelCorrectResponse)) {
                $baseType = $variable->getBaseType();
                $cardinality = $variable->getCardinality();
                $dataModelValues = $dataModelCorrectResponse->getValues();
                $correctResponse = static::dataModelValuesToRuntime($dataModelValues, $baseType, $cardinality);

                $variable->setCorrectResponse($correctResponse);
            }

            return $variable;
        } else {
            $msg = "ResponseVariable::createFromDataModel only accept 'qtism\\data\\state\\ResponseDeclaration' objects, '" . get_class($variableDeclaration) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }