public function testVisitComplete()
{
$visitor = $this->getVisitor();
$generator = $this->getGenerator();
$generator->startDocument(null);
$roleAssignment = new RoleAssignment(array('role' => new Role(array('id' => 42))));
$visitor->visit($this->getVisitorMock(), $generator, $roleAssignment);
$result = $generator->endDocument(null);
$this->assertNotNull($result);
return $result;
}