public function testApiDone_ThrowsException_WhenHandlerRejectsWithException_ForRejectedPromise()
{
$deferred = $this->createDeferred();
$test = $this->getTest();
$test->setExpectedException(Exception::class, 'RejectionException');
$deferred->reject(new Exception('RejectionException'));
$test->assertNull($deferred->getPromise()->done());
}