public function theMediaCollectionShouldExist($name)
{
$meta = $this->getEntityManager()->getRepository('Sulu\\Bundle\\MediaBundle\\Entity\\CollectionMeta')->findOneByTitle($name);
if (!$meta) {
throw new \InvalidArgumentException(sprintf('Collection "%s" should exist'));
}
}