public function testProcessDispatchesHandlerWhenMatched()
{
$done = function ($req, $res, $err = null) {
Assert::fail('Should not have hit the done handler, but did');
};
$request = $this->request->withUri(new Uri('http://local.example.com/foo'));
$response = $this->prophesize(ResponseInterface::class)->reveal();
$middleware = $this->prophesize(ServerMiddlewareInterface::class);
$middleware->process(Argument::type(RequestInterface::class), Argument::type(Next::class))->willReturn($response);
$this->queue->enqueue(new Route('/foo', $middleware->reveal()));
$next = new Next($this->queue, $done);
$next->setResponsePrototype($response);
$this->assertSame($response, $next->process($request));
}