/**
  * {@inheritdoc}
  */
 public function getMetadata($path)
 {
     $response = $this->client->getMetadata($path);
     $responseContent = json_decode((string) $response->getBody());
     $flysystemMetadata = new FlysystemMetadata(FlysystemMetadata::TYPE_FILE, $path);
     $this->updateFlysystemMetadataFromResponseContent($flysystemMetadata, $responseContent);
     return $flysystemMetadata->toArray();
 }
 public function testItemExistsWhenItDoesntExist()
 {
     $client = $this->getMockBuilder('\\GuzzleHttp\\Client')->getMock();
     $accessToken = '123456789';
     $exception = new ClientException('Not found', new Request('GET', 'uri'), new Response(404));
     $client->expects($this->once())->method('send')->willThrowException($exception);
     $oneDriveClient = new OneDriveClient($accessToken, $client);
     $result = $oneDriveClient->itemExists('some file.txt');
     $this->assertSame(false, $result);
 }