public function testVisit()
{
$visitor = $this->getVisitor();
$generator = $this->getGenerator();
$generator->startDocument(null);
$UserRefList = new UserRefList(array(new RestUser(new User(), $this->getMockForAbstractClass('eZ\\Publish\\API\\Repository\\Values\\ContentType\\ContentType'), new ContentInfo(array('id' => 14)), new Location(), array())), '/some/path');
$this->addRouteExpectation('ezpublish_rest_loadUser', array('userId' => $UserRefList->users[0]->contentInfo->id), "/user/users/{$UserRefList->users[0]->contentInfo->id}");
$visitor->visit($this->getVisitorMock(), $generator, $UserRefList);
$result = $generator->endDocument(null);
$this->assertNotNull($result);
$dom = new \DOMDocument();
$dom->loadXml($result);
return $dom;
}