/**
  * Checks if images is modified by some other user
  *
  * @param ImageInterface $entity
  * @param string $hash
  * @throws FileHashChangedException
  */
 protected function checksum(ImageInterface $entity)
 {
     $currentHash = $this->imageManager->checksumTemporaryFileByName($entity->getName());
     if ($entity->getHash() !== $currentHash) {
         throw new FileHashChangedException($entity->getName());
     }
 }