/**
  * @param File $file
  * @param int $width
  * @param int $height
  * @param bool $keepAspect
  * @param bool $base64Encode
  */
 private function mockCreatePreviewThrowsException($file, $width, $height, $keepAspect, $base64Encode)
 {
     $exception = new InternalServerErrorServiceException('Encryption ate your file');
     $this->previewService->expects($this->once())->method('createPreview')->with($this->equalTo($file), $this->equalTo($width), $this->equalTo($height), $this->equalTo($keepAspect), $this->equalTo($base64Encode))->willthrowException($exception);
 }
 /**
  * @param $square
  * @param $base64Encode
  * @param $base64EncodedPreview
  */
 private function mockPreviewValidator($square, $base64Encode, $base64EncodedPreview)
 {
     $this->previewService->expects($this->once())->method('previewValidator')->with($square, $base64Encode)->willReturn($base64EncodedPreview);
 }