public async Task CreateContainer(bool isCreateCalled)
        {
            // Arrange
            var plateFile = _fixture.Create <string>();
            var level     = _fixture.Create <int>();
            var x         = _fixture.Create <int>();
            var y         = _fixture.Create <int>();
            var options   = new AzurePlateTilePyramidOptions
            {
                CreateContainer = isCreateCalled
            };

            using var mock = ConfigureServiceClient(plateFile, level, x, y)
                             .Provide(options)
                             .Build();
            var pyramid = mock.Resolve <AzurePlateTilePyramid>();

            // Act
            using var stream1 = pyramid.GetStream(plateFile, level, x, y);
            using var stream2 = pyramid.GetStream(plateFile, level, x, y);

            // Assert
            Assert.Same(stream1, stream2);

            if (isCreateCalled)
            {
                await mock.Resolve <BlobContainerClient>().Received(1).CreateIfNotExistsAsync();
            }
            else
            {
                await mock.Resolve <BlobContainerClient>().DidNotReceive().CreateIfNotExistsAsync();
            }
        }
        public async Task VeriyExists(bool skipIfExists, bool exists)
        {
            // Arrange
            var plateFile = _fixture.Create <string>();
            var level     = _fixture.Create <int>();
            var x         = _fixture.Create <int>();
            var y         = _fixture.Create <int>();
            var options   = new AzurePlateTilePyramidOptions
            {
                SkipIfExists = skipIfExists,
            };

            using var mock = ConfigureServiceClient(plateFile, level, x, y)
                             .Provide(options)
                             .Build();

            mock.Resolve <BlobClient>().Configure().ExistsAsync().Returns(Response.FromValue(exists, null));

            var stream = Substitute.For <Stream>();

            // Act
            var result = await mock.Resolve <AzurePlateTilePyramid>().SaveStreamAsync(stream, plateFile, level, x, y, default);

            // Assert
            Assert.Equal(!skipIfExists || !exists, result);
        }