@dataProvider flattenDataProvider
public function testFlattenHttpException(\Exception $exception, $statusCode) {
$flattened = FlattenException::create($exception);
$flattened2 = FlattenException::create($exception);
$flattened
->setPrevious($flattened2);
$this
->assertEquals($exception
->getMessage(), $flattened
->getMessage(), 'The message is copied from the original exception.');
$this
->assertEquals($exception
->getCode(), $flattened
->getCode(), 'The code is copied from the original exception.');
$this
->assertEquals(get_class($exception), $flattened
->getClass(), 'The class is set to the class of the original exception');
}