/**
  * @test
  * @expectedException Adlogix\ConfluenceClient\Exception\ApiException
  */
 public function downloadAttachment_CatchClientException_Exception()
 {
     $serializer = $this->createMock(SerializerInterface::class);
     $httpClient = $this->createMock(HttpClientInterface::class);
     $authentication = $this->createMock(AuthenticationInterface::class);
     $request = $this->createMock(RequestInterface::class);
     $exception = new ClientException("message", $request);
     $httpClient->expects($this->once())->method("attachmentRequest")->willThrowException($exception);
     $client = new Client($httpClient, $serializer, $authentication);
     $client->downloadAttachment("some/path");
 }