public function testApiHandleMessage_ClosesConnectionWithCode403_WhenHttpRequestReceived_ButMatcherThrowsMethodNotAllowedException()
{
$conn = $this->getMock(NetworkConnection::class, [], [], '', false);
$mssg = $this->createPassableMessage();
$server = $this->createServer();
$router = $this->createRouter($server, ['close']);
$router->expects($this->once())->method('close')->with($conn, 403);
$matcher = $this->createMatcher(['match']);
$matcher->expects($this->once())->method('match')->will($this->throwException(new MethodNotAllowedException([])));
$router->handleMessage($conn, $mssg);
}