/// <summary>
        /// Will start calculating leaderboard, and invoke LeaderboardUpdated
        /// each time new results are available.
        /// </summary>
        public async Task StartCalculating()
        {
            var stream = _service.CalculateTopTenLive();

            await foreach (var topTen in stream)
            {
                await Clients.Caller.LeaderboardUpdated(topTen);
            }
        }
        public async Task CalculateTopTenLive_WithResultsFromFacade_ReturnsAccurateTopTen(
            AanbodPage[] pages,
            string[] leaderboardNames,
            int[] leaderboardScores)
        {
            // Arrange
            var pageQueue = new Queue <AanbodPage>(pages);

            // By dequeueing, this will fail hard if it tries getting more pages than it should
            _facadeMock.Setup(f => f.GetAanbod(It.IsAny <string>(), It.IsAny <int>(), It.IsAny <int>(), It.IsAny <CancellationToken>()))
            .ReturnsAsync(() => pageQueue.Dequeue());

            // Act
            var lastResult = await _service.CalculateTopTenLive().LastAsync();

            // Assert
            for (var i = 0; i < lastResult.Leaderboard.Length; i++)
            {
                Assert.Equal(leaderboardNames[i], lastResult.Leaderboard[i].AgentName);
                Assert.Equal(leaderboardScores[i], lastResult.Leaderboard[i].NumberOfAds);
            }
        }