public function testSwitchAssociation()
{
$article = $this->dm->find('Doctrine\\Tests\\Models\\CMS\\CmsArticle', $this->articleId);
$otherUser = $this->dm->find('Doctrine\\Tests\\Models\\CMS\\CmsUser', $this->userIds[1]);
$article->setAuthor($otherUser);
$this->dm->flush();
$this->dm->clear();
$article = $this->dm->find('Doctrine\\Tests\\Models\\CMS\\CmsArticle', $this->articleId);
$this->assertInstanceOf('Doctrine\\Tests\\Models\\CMS\\CmsUser', $article->user);
$this->assertEquals('lsmith', $article->user->getUsername());
}