public function testApiConstructor_CreatesInstance_WithPreviousElementBeingError()
{
$prev = new Error('Previous');
$ex = new Error('Error', 0, $prev);
$proxy = $this->createThrowableProxy($ex);
$throwable = $proxy->toThrowable();
$this->assertInstanceOf(Error::class, $throwable);
$this->assertSame('Error', $throwable->getMessage());
$throwable = $throwable->getPrevious();
$this->assertInstanceOf(Error::class, $throwable);
$this->assertSame('Previous', $throwable->getMessage());
}