public function testGetRelated_HasOne()
{
// collections
$carsCollection = $this->database->getCollection('cars');
$enginesCollection = $this->database->getCollection('engines');
// add documents
$carDocument = $carsCollection->createDocument(array('param' => 'value'))->save();
// add target document
$engineDocument = $enginesCollection->createDocument(array('car_id' => $carDocument->getId()))->save();
// test
$this->assertInstanceOf('\\Sokil\\Mongo\\DocumentRelationTest\\EngineDocument', $carDocument->engine);
$this->assertEquals($engineDocument->getId(), $carDocument->engine->getId());
}