/**
  * Find an entity by id.
  *
  * @param int $entityId The Entity id.
  *
  * @return Entity
  *
  * @throws \InvalidArgumentException If no entity were found.
  */
 public function find($entityId)
 {
     $config = $this->provider->getEmptyConfig();
     $config->setId($entityId);
     $model = $this->provider->fetch($config);
     if (!$model) {
         throw new \InvalidArgumentException(sprintf('Could not find entity "%s"', $entityId));
     }
     return $model;
 }