public function testVisit()
{
$visitor = $this->getVisitor();
$generator = $this->getGenerator();
$generator->startDocument(null);
// @todo coverage add actual object states + visitor mock for RestObjectState
$stateList = new ObjectStateList(array(), 42);
$this->addRouteExpectation('ezpublish_rest_loadObjectStates', array('objectStateGroupId' => $stateList->groupId), "/content/objectstategroups/{$stateList->groupId}/objectstates");
$visitor->visit($this->getVisitorMock(), $generator, $stateList);
$result = $generator->endDocument(null);
$this->assertNotNull($result);
return $result;
}