public function testIsStoredWhenIdSet()
{
// not stored
$document = $this->collection->createDocument(array('k' => 'v'));
$document->setId(new \MongoId());
$this->assertFalse($document->isStored());
// stored
$document->save();
$this->assertTrue($document->isStored());
}