public function testVisit()
{
$visitor = $this->getVisitor();
$generator = $this->getGenerator();
$generator->startDocument(null);
$groupList = new ObjectStateGroupList(array());
$this->addRouteExpectation('ezpublish_rest_loadObjectStateGroups', array(), '/content/objectstategroups');
$visitor->visit($this->getVisitorMock(), $generator, $groupList);
$result = $generator->endDocument(null);
$this->assertNotNull($result);
return $result;
}