public void SendUsageStatistics(TimeSpan duration, Job job, string status)
        {
            if (IsEnabled)
            {
                var usageMetric = CreateJobUsageStatisticsMetric(job, duration, status);

                var senderThread = new SynchronizedThread(() => _sender.Send(usageMetric));

                _threadManager.StartSynchronizedThread(senderThread);
            }
        }
        public void UserStatisticsSender_SendServiceStatistics_HttpHandlerPostAsyncRecivesOneCall()
        {
            _usageStatisticsSender.Send(_serviceUsageStatisticsMetric);

            _httpHandler.Received(1).PostAsync(Arg.Any <Uri>(), Arg.Any <HttpContent>());
        }