public CatalogProcessor(
            ICursor cursor,
            ICatalogClient client,
            ICatalogLeafProcessor leafProcessor,
            CatalogProcessorSettings settings,
            ILogger <CatalogProcessor> logger)
        {
            _leafProcessor = leafProcessor ?? throw new ArgumentNullException(nameof(leafProcessor));
            _client        = client ?? throw new ArgumentNullException(nameof(client));
            _cursor        = cursor ?? throw new ArgumentNullException(nameof(cursor));
            _logger        = logger ?? throw new ArgumentNullException(nameof(logger));

            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            if (settings.ServiceIndexUrl == null)
            {
                throw new ArgumentException(
                          $"The {nameof(CatalogProcessorSettings.ServiceIndexUrl)} property of the " +
                          $"{nameof(CatalogProcessorSettings)} must not be null.",
                          nameof(settings));
            }

            // Clone the settings to avoid mutability issues.
            _settings = settings.Clone();
        }
            public void CopiesAllProperties()
            {
                // Arrange
                var expected = new CatalogProcessorSettings
                {
                    ServiceIndexUrl           = "https://example/v3/index.json",
                    DefaultMinCommitTimestamp = new DateTimeOffset(2017, 11, 8, 13, 50, 44, TimeSpan.Zero),
                    MinCommitTimestamp        = new DateTimeOffset(2010, 1, 1, 0, 0, 0, TimeSpan.Zero),
                    MaxCommitTimestamp        = new DateTimeOffset(2020, 1, 1, 0, 0, 0, TimeSpan.Zero),
                    ExcludeRedundantLeaves    = true,
                };

                // Act
                var actual = expected.Clone();

                // Assert
                actual.Should().BeEquivalentTo(expected);
            }