public function testInverseManyToManyIdentityMap()
{
$user = $this->dm->find('Doctrine\\Tests\\Models\\CMS\\CmsUser', $this->userId);
$group = $this->dm->find('Doctrine\\Tests\\Models\\CMS\\CmsGroup', $this->groupIds[0]);
$this->assertInstanceOf('Doctrine\\Tests\\Models\\CMS\\CmsGroup', $group);
$this->assertInstanceOf('Doctrine\\ODM\\CouchDB\\PersistentCollection', $group->users);
$this->assertFalse($group->users->isInitialized);
$this->assertEquals(1, count($group->users));
$this->assertTrue($group->users->isInitialized);
$this->assertSame($user, $group->users[0]);
}