public function getPersistence()
    {
        $persistence = $this->getContainer()->get('liip.translation.persistence');

        if (false === $persistence instanceof GitPersistence) {
            throw new \RuntimeException(sprintf(
                'Cannot initialize git repository, configured persistence should be "%s", "%s" given',
                'Liip\TranslationBundle\Persistence\GitPersistence',
                get_class($persistence)
            ));
        }

        return $persistence;
    }