/**
*
*/
public function testApiInvoke_ThrowsExceptionsFromCancel()
{
$this->setExpectedException(Exception::class, 'test');
$mock = $this->getMock(PromiseInterface::class);
$mock->expects($this->once())->method('cancel')->will($this->throwException(new Exception('test')));
$cancellationQueue = new CancellationQueue();
$cancellationQueue->enqueue($mock);
$cancellationQueue();
}