public function testDecoratedDelegateWillBeInvokedWithOnlyRequest()
{
$request = $this->prophesize(ServerRequestInterface::class)->reveal();
$response = $this->prophesize(ResponseInterface::class)->reveal();
$expected = $this->prophesize(ResponseInterface::class)->reveal();
$delegate = $this->prophesize(DelegateInterface::class);
$delegate->process($request)->willReturn($expected);
$decorator = new CallableMiddlewareWrapper(function ($request, $response, $next) {
return $next($request, $response);
}, $response);
$this->assertSame($expected, $decorator->process($request, $delegate->reveal()));
}