public function testApiHandleError_ClosesConnectionWithCode500_WhenConnectionControllerDoesNotExist()
{
$ex = new Exception();
$conn = $this->getMock(NetworkConnection::class, [], [], '', false);
$server = $this->createServer();
$router = $this->createRouter($server, ['close']);
$router->expects($this->once())->method('close')->with($conn, 500);
$router->handleError($conn, $ex);
}