public async Task RemoteOrchestrator_GetServerScopeInfo_ShouldReturnSchema()
        {
            var dbName = HelperDatabase.GetRandomName("tcp_lo_");
            await HelperDatabase.CreateDatabaseAsync(ProviderType.Sql, dbName, true);

            var cs          = HelperDatabase.GetConnectionString(ProviderType.Sql, dbName);
            var sqlProvider = new SqlSyncProvider(cs);
            var ctx         = new AdventureWorksContext((dbName, ProviderType.Sql, sqlProvider), true, false);
            await ctx.Database.EnsureCreatedAsync();

            var scopeName = "scope";

            var options = new SyncOptions();
            var setup   = new SyncSetup(this.Tables);

            var onSchemaRead    = false;
            var onSchemaReading = false;

            var remoteOrchestrator = new RemoteOrchestrator(sqlProvider, options);

            remoteOrchestrator.OnSchemaLoading(args =>
            {
                Assert.Equal(scopeName, args.Context.ScopeName);
                onSchemaReading = true;
            });

            remoteOrchestrator.OnSchemaLoaded(args =>
            {
                Assert.IsType <SchemaLoadedArgs>(args);
                Assert.Equal(SyncStage.Provisioning, args.Context.SyncStage);
                Assert.Equal(scopeName, args.Context.ScopeName);
                Assert.NotNull(args.Connection);
                Assert.Null(args.Transaction);
                Assert.Equal(ConnectionState.Open, args.Connection.State);
                Assert.Equal(16, args.Schema.Tables.Count);
                onSchemaRead = true;
            });

            AssertConnectionAndTransaction(remoteOrchestrator, scopeName);

            var scopeInfo = await remoteOrchestrator.GetServerScopeInfoAsync(scopeName, setup);

            Assert.NotNull(scopeInfo.Schema);
            Assert.NotNull(scopeInfo.Setup);
            Assert.Equal(16, scopeInfo.Schema.Tables.Count);
            Assert.True(onSchemaRead);
            Assert.True(onSchemaReading);

            var schema = await remoteOrchestrator.GetSchemaAsync(scopeName, setup);

            Assert.NotNull(schema);
            Assert.Equal(16, schema.Tables.Count);


            HelperDatabase.DropDatabase(ProviderType.Sql, dbName);
        }