public async Task NoProfileToProcessNoProcessingOccurs()
        {
            A.CallTo(() => _domainTlsSecurityProfileDao.GetSecurityProfilesForUpdate()).Returns(Task.FromResult(new List <DomainTlsSecurityProfile>()));

            await _mxSecurityTesterProcessor.Process();

            A.CallTo(() => _domainTlsSecurityProfileDao.GetSecurityProfilesForUpdate()).MustHaveHappened(Repeated.Exactly.Once);
            A.CallTo(() => _certsSecurityProfileUpdater.UpdateSecurityProfiles(A <List <DomainTlsSecurityProfile> > ._)).MustNotHaveHappened();
        }
        public async Task Process()
        {
            Stopwatch stopwatch = Stopwatch.StartNew();
            //this dao will need updating to read new data structure
            //as will DomainTlsSecurityProfile to have all test results
            List <DomainTlsSecurityProfile> securityProfilesToUpdate = await _domainTlsSecurityProfileDao.GetSecurityProfilesForUpdate();

            _log.Debug($"Found {securityProfilesToUpdate.Count} domains to update.");
            int itemsProcessed = 0;

            while (securityProfilesToUpdate.Any())
            {
                await _securityProfileUpdater.UpdateSecurityProfiles(securityProfilesToUpdate);

                itemsProcessed += securityProfilesToUpdate.Count;

                securityProfilesToUpdate = await _domainTlsSecurityProfileDao.GetSecurityProfilesForUpdate();

                _log.Debug($"Found {securityProfilesToUpdate.Count} domains to update.");
            }
            _log.Debug($"Processing {itemsProcessed} domains took: {stopwatch.Elapsed}");
            stopwatch.Stop();
        }