public function testStoreFileExceptionWhileInsertingRecord()
{
$id = new \MongoID();
$collection = $this->getGridFS();
$document = ['_id' => $id];
$collection->insert($document);
$this->setExpectedExceptionRegExp('MongoGridFSException', '/Could not store file:.* E11000 duplicate key error .* mongo-php-adapter\\.fs\\.files/');
$collection->storeFile(__FILE__, ['_id' => $id]);
}