public void WhenJoinersAndLeaversAlternate_ThenHighWatermarkIsOne()
        {
            var baseDate = new DateTime(2020, 1, 1);

            var joiners = new[]
            {
                baseDate,
                baseDate.AddHours(2)
            };

            var leavers = new[]
            {
                baseDate.AddHours(1),
                baseDate.AddHours(3)
            };

            Assert.AreEqual(1, TimeseriesUtil.HighWatermark(joiners, leavers));
        }
        public void WhenJoinersAndLeaversOverlap_ThenHighWatermarkIsOverOne()
        {
            var baseDate = new DateTime(2020, 1, 1);

            var joiners = new[]
            {
                baseDate,
                baseDate.AddHours(1),
                baseDate.AddHours(2),
                baseDate.AddHours(6)
            };

            var leavers = new[]
            {
                baseDate.AddHours(3),
                baseDate.AddHours(4),
                baseDate.AddHours(5),
                baseDate.AddHours(7)
            };

            Assert.AreEqual(3, TimeseriesUtil.HighWatermark(joiners, leavers));
        }