public function testGetDBRef()
{
for ($i = 0; $i < 50; $i++) {
$this->object->insert(array('x' => rand()));
}
$obj = $this->object->findOne();
$ref = $this->object->createDBRef($obj);
$obj2 = $this->object->getDBRef($ref);
$this->assertNotNull($obj2);
$this->assertEquals($obj['x'], $obj2['x']);
}