public function testThrowsExceptionWhenNotAbleToGetDatabase()
{
$client = $this->getMockBuilder('MongoClient')->disableOriginalConstructor()->getMock();
$client->expects($this->once())->method('selectDB')->will($this->throwException(new MongoException()));
$adapter = new GridFS(['databaseName' => $this->databaseName], $client);
$adapter->storeImageVariation('key', 'id', 'blob', 700);
}