public async Task TestIndexHasBeenWrittenFromAnotherSourceShouldSkipIndex()
        {
            var seed = Seed.Random();

            // Publish a message as if it was published from another app
            var tempProvider = new InMemoryDeterministicSeedManager(
                new InMemoryResourceTracker(),
                new IssSigningHelper(new Curl(), new Curl(), new Curl()),
                new AddressGenerator(),
                IotaResourceProvider.Repository);

            var credentials = await tempProvider.CreateChannelCredentialsAsync(seed);

            var channel = new MamChannelFactory(CurlMamFactory.Default, CurlMerkleTreeFactory.Default, IotaResourceProvider.Repository).Create(
                Mode.Restricted,
                credentials.Seed,
                IotaFhirRepository.SecurityLevel,
                credentials.ChannelKey);

            var message = channel.CreateMessage(TryteString.FromAsciiString("Test"));
            await channel.PublishAsync(message, 14, 1);

            // Create credentials that should skip the first index
            var provider = new InMemoryDeterministicSeedManager(
                new InMemoryResourceTracker(),
                new IssSigningHelper(new Curl(), new Curl(), new Curl()),
                new AddressGenerator(),
                IotaResourceProvider.Repository);

            await provider.CreateChannelCredentialsAsync(seed);

            Assert.AreEqual(1, provider.CurrentIndex);
        }
        public async Task TestNoIndexIsUsedShouldUseFirstIndex()
        {
            var provider = new InMemoryDeterministicSeedManager(
                new InMemoryResourceTracker(),
                new IssSigningHelper(new Curl(), new Curl(), new Curl()),
                new AddressGenerator(),
                IotaResourceProvider.Repository);

            await provider.CreateChannelCredentialsAsync(Seed.Random());

            Assert.AreEqual(0, provider.CurrentIndex);
        }