public void Cloning_copies_options_and_further_config_does_not_impact_original()
        {
            var model = Mock.Of <IModel>();

            IDbContextOptions options = new DbContextOptions <UnkoolContext>().UseModel(model);

            options.AddOrUpdateExtension <FakeDbContextOptionsExtension1>(e => { });

            options.RawOptions = new Dictionary <string, string> {
                { "ConnectionString", "Database=Crunchie" }
            };

            var clone = options.Clone();

            Assert.IsType <DbContextOptions <UnkoolContext> >(clone);
            Assert.Same(model, clone.Model);

            var cloneAsExtensions = ((IDbContextOptions)clone);

            Assert.Equal(1, cloneAsExtensions.Extensions.Count);
            Assert.IsType <FakeDbContextOptionsExtension1>(cloneAsExtensions.Extensions[0]);

            Assert.Equal("Database=Crunchie", cloneAsExtensions.RawOptions["ConnectionString"]);

            var model2 = Mock.Of <IModel>();

            clone.UseModel(model2);

            cloneAsExtensions.AddOrUpdateExtension <FakeDbContextOptionsExtension2>(e => { });

            Assert.Same(model2, clone.Model);

            Assert.Equal(2, cloneAsExtensions.Extensions.Count);
            Assert.IsType <FakeDbContextOptionsExtension1>(cloneAsExtensions.Extensions[0]);
            Assert.IsType <FakeDbContextOptionsExtension2>(cloneAsExtensions.Extensions[1]);

            Assert.Same(model, options.Model);

            Assert.Equal(1, options.Extensions.Count);
            Assert.IsType <FakeDbContextOptionsExtension1>(options.Extensions[0]);
        }