public function testConvertToBson(\MongoRegex $regex)
{
$this->skipTestUnless($regex instanceof TypeInterface);
$bsonRegex = $regex->toBSONType();
$this->assertInstanceOf('MongoDB\\BSON\\Regex', $bsonRegex);
$this->assertSame('abc', $bsonRegex->getPattern());
$this->assertSame('i', $bsonRegex->getFlags());
}