/**
  * @covers DmMailerAdmin\Controller\MessageController
  */
 public function testUpdateActionReturnsViewWhenHandlePostThrowsException()
 {
     $exception = new \DmMailer\Manager\Exception\Db('foo');
     $paramsMock = $this->mockFactory->getParamsMock(1);
     $layoutStub = new \StdClass();
     $urlMock = $this->mockFactory->getUrlMock();
     $pluginManagerMock = $this->mockFactory->getPluginMock($paramsMock, $layoutStub, $urlMock);
     $this->sut->setPluginManager($pluginManagerMock);
     $this->repositoryMock->expects($this->any())->method('getOneById')->will($this->returnValue($this->getMessageMock()));
     $this->managerMock->expects($this->any())->method('handlePost')->will($this->throwException($exception));
     $actualResult = $this->sut->updateAction();
     $this->assertInstanceOf('Zend\\View\\Model\\ViewModel', $actualResult);
 }