public function testConvertException($e, $expectedClass)
{
$exception = ExceptionConverter::toLegacy($e);
$this->assertInstanceOf($expectedClass, $exception);
$this->assertSame($e->getMessage(), $exception->getMessage());
$this->assertSame($e->getCode(), $exception->getCode());
$this->assertSame($e, $exception->getPrevious());
}