public void UpdateHealth_should_update_health_and_save_it_in_repository()
        {
            SetupMonitors("monitor");
            var id     = _registry.RegisterOrUpdate("monitor", "address", "group", "name", null, null, "password");
            var health = new EndpointHealth(DateTime.UtcNow, TimeSpan.Zero, EndpointStatus.Healthy);

            Assert.True(_registry.UpdateHealth(id, health));
            _statsManager.Verify(r => r.RecordEndpointStatistics(It.IsAny <EndpointIdentity>(), It.IsAny <EndpointMetadata>(), health));
            Assert.Same(_registry.GetById(id).Health, health);
        }
        public void UpdateHealth_should_update_health_and_save_it_in_repository()
        {
            SetupMonitors("monitor");
            var id     = _registry.RegisterOrUpdate("monitor", "address", "group", "name", null);
            var health = new EndpointHealth(DateTime.UtcNow, TimeSpan.Zero, EndpointStatus.Healthy);

            _registry.UpdateHealth(id, health);
            _statsRepository.Verify(r => r.InsertEndpointStatistics(id, health));
            Assert.Same(_registry.GetById(id).Health, health);
        }