public function testShouldNotDecoratePsrResponseAsStratigilityCompletedResponseWhenHandlingErrors()
{
$error = new Exception('Exception message', 501);
$response = (new PsrResponse())->withStatus(200);
$final = new FinalHandler([], new Response(new PsrResponse()));
$test = $final($this->prophesize('Zend\\Stratigility\\Http\\Request')->reveal(), $response, $error);
$this->assertInstanceOf(ResponseInterface::class, $test);
$this->assertSame(501, $test->getStatusCode());
$this->assertSame('Not Implemented', $test->getReasonPhrase());
$body = $test->getBody();
$body->rewind();
$this->assertContains('Not Implemented', $body->getContents());
}