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