/**
  * @expectedException \RuntimeException
  * @expectedExceptionMessage Exception
  */
 public function testExecuteException()
 {
     $om = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
     $jobUpdate = $om->create('Magento\\Update\\Queue\\JobUpdate', ['composerApp' => $this->composerApp, 'status' => $this->status, 'params' => ['components' => [['name' => 'vendor/package', 'version' => '1.0']]], 'queue' => $this->queue, 'name' => 'setup:upgrade']);
     $this->status->expects($this->atLeastOnce())->method('add');
     $this->composerApp->expects($this->at(0))->method('runComposerCommand')->with(['command' => 'require', 'packages' => ['vendor/package 1.0'], '--no-update' => true])->willReturn('Success');
     $this->composerApp->expects($this->at(1))->method('runComposerCommand')->with(['command' => 'update'])->will($this->throwException(new \Exception('Exception')));
     $this->status->expects($this->once())->method('setUpdateError')->with(true);
     $jobUpdate->execute();
 }