public function testVisitEmptyDocument()
{
$data = new stdClass();
$generator = $this->getMock('\\eZ\\Publish\\Core\\REST\\Common\\Output\\Generator');
$generator->expects($this->at(1))->method('startDocument')->with($data);
$generator->expects($this->at(2))->method('isEmpty')->will($this->returnValue(true));
$generator->expects($this->never())->method('endDocument');
$visitor = $this->getMock('\\eZ\\Publish\\Core\\REST\\Common\\Output\\Visitor', array('visitValueObject'), array($generator, $this->getValueObjectDispatcherMock()));
$this->assertEquals(new Response(null, 200, array()), $visitor->visit($data));
}