public function getViewFileUrlWithException()
 {
     $params = ['a' => 'b'];
     $paramsSecure = ['a' => 'b', '_secure' => false];
     $fileId = 'file id';
     $fileUrl = 'exception url';
     $this->requestMock->expects($this->once())->method('isSecure')->willReturn(false);
     $exception = new LocalizedException('message');
     $this->repositoryMock->expects($this->once())->method('getUrlWithParams')->with($fileId, $paramsSecure)->willThrowException($exception);
     $this->loggerMock->expects($this->once())->method('critical')->with($exception);
     $this->urlMock->expects($this->once())->method('getUrl')->with('', ['_direct' => 'core/index/notFound'])->willReturn($fileUrl);
     $this->assertEquals($fileUrl, $this->model->getViewFileUrl($fileId, $params));
 }