protected function setUp()
 {
     $this->frontendUser = $this->getMock(\TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication::class, array('dummy'));
     $this->flashMessageQueue = $this->getAccessibleMock(\TYPO3\CMS\Core\Messaging\FlashMessageQueue::class, array('getUserByContext'), array('core.template.flashMessages'));
     $this->flashMessageQueue->expects($this->any())->method('getUserByContext')->will($this->returnValue($this->frontendUser));
 }