public function testInsertFailureThrowsDatabaseException()
{
$client = $this->getMockBuilder('MongoClient')->disableOriginalConstructor()->getMock();
$collection = $this->getMockBuilder('MongoCollection')->disableOriginalConstructor()->getMock();
$collection->expects($this->once())->method('insert')->will($this->throwException(new MongoException()));
$adapter = new MongoDB(['databaseName' => $this->databaseName], $client, $collection);
$adapter->storeImageVariationMetadata('key', 'id', 700, 700);
}