private function getSourceClassFromMapping(array $params)
    {
        $index = $params['index'];
        $type = $params['type'];
        if (!isset($this->indexTypeClassMap[$index])) {
            throw new DeserializationFailureException('Cannot find index in source class map: ' . $index);
        }

        if (!isset($this->indexTypeClassMap[$index][$type])) {
            throw new DeserializationFailureException(
                'Cannot find type in source class map: ' . $type . ' in index ' . $index
            );
        }

        return $this->indexTypeClassMap[$index][$type];
    }