public async Task <DatabaseScavengeResult> StartScavengeAsync(
            int threadCount    = 1,
            int startFromChunk = 0,
            UserCredentials?userCredentials     = null,
            CancellationToken cancellationToken = default)
        {
            if (threadCount <= 0)
            {
                throw new ArgumentOutOfRangeException(nameof(threadCount));
            }

            if (startFromChunk < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(startFromChunk));
            }

            var result = await _client.StartScavengeAsync(new StartScavengeReq {
                Options = new StartScavengeReq.Types.Options {
                    ThreadCount    = threadCount,
                    StartFromChunk = startFromChunk
                }
            }, EventStoreCallOptions.Create(Settings, Settings.OperationOptions, userCredentials, cancellationToken));

            return(result.ScavengeResult switch {
                ScavengeResp.Types.ScavengeResult.Started => DatabaseScavengeResult.Started(result.ScavengeId),
                ScavengeResp.Types.ScavengeResult.Stopped => DatabaseScavengeResult.Stopped(result.ScavengeId),
                ScavengeResp.Types.ScavengeResult.InProgress => DatabaseScavengeResult.InProgress(result.ScavengeId),
                _ => throw new InvalidOperationException()
            });
        public async Task stop()
        {
            var startResult = await _fixture.Client.StartScavengeAsync(userCredentials : TestCredentials.Root);

            var stopResult = await _fixture.Client
                             .StopScavengeAsync(startResult.ScavengeId, TestCredentials.Root);

            Assert.Equal(DatabaseScavengeResult.Stopped(startResult.ScavengeId), stopResult);
        }
        public async Task start()
        {
            var result = await _fixture.Client.StartScavengeAsync(userCredentials : TestCredentials.Root);

            Assert.Equal(DatabaseScavengeResult.Started(result.ScavengeId), result);
        }