public function getIndexMetadata($contextName)
    {
        if (!isset($this->indexMetadatas[$contextName])) {
            throw new \InvalidArgumentException(sprintf(
                'Context name "%s" not known, known contexts: "%s"',
                $contextName, implode('", "', array_keys($this->indexMetadatas))
            ));
        }

        return $this->indexMetadatas[$contextName];
    }