public function testCallingProcessWithInteropMiddlewareDispatchesIt()
{
$next = $this->prophesize(Next::class);
$next->willImplement(DelegateInterface::class);
$request = $this->prophesize(ServerRequestInterface::class)->reveal();
$response = $this->prophesize(ResponseInterface::class);
$middleware = $this->prophesize(ServerMiddlewareInterface::class);
$middleware->process($request, Argument::that([$next, 'reveal']))->will([$response, 'reveal']);
$route = new Route('/foo', $middleware->reveal());
$dispatch = new Dispatch();
$this->assertSame($response->reveal(), $dispatch->process($route, $request, $next->reveal()));
}