public void TestSubscriptionsLoading()
        {
            foreach (var dataService in DataServices)
            {
                // Arrange.
                const string client1Id      = "FDF33DF1-5DCA-41F9-A2E4-3B5C7E103452";
                const string client2Id      = "31D12F7D-2D0E-43FB-8092-E6D34A9AB87D";
                const string messageType1Id = "EB6EC229-5E93-4B76-9993-5A1589787421";
                const string messageType2Id = "C8802C67-AC1B-497C-A707-5FF4191E0083";
                const string messageType3Id = "BC3F54C6-4E2F-43DA-B124-A0771F8F200C";
                var          service        = new DefaultSubscriptionsManager(dataService, GetMockStatisticsService());
                service.CreateClient(client1Id, "TestClient1");
                service.CreateClient(client2Id, "TestClient2");
                service.CreateMessageType(new ServiceBusMessageType
                {
                    ID          = messageType1Id,
                    Name        = "TestMessageType1",
                    Description = "ForTest"
                });
                service.CreateMessageType(new ServiceBusMessageType
                {
                    ID          = messageType2Id,
                    Name        = "TestMessageType2",
                    Description = "ForTest"
                });
                service.CreateMessageType(new ServiceBusMessageType
                {
                    ID          = messageType3Id,
                    Name        = "TestMessageType3",
                    Description = "ForTest"
                });
                service.SubscribeOrUpdate(client1Id, messageType1Id, true, TransportType.WCF, DateTime.Now.AddDays(1));
                service.SubscribeOrUpdate(client1Id, messageType3Id, true, TransportType.WCF, DateTime.Now.AddDays(-1));
                service.SubscribeOrUpdate(client1Id, messageType2Id, false, null, DateTime.Now.AddDays(1));
                service.SubscribeOrUpdate(client2Id, messageType2Id, false, null, DateTime.Now.AddDays(1));

                // Act && Assert.
                var subs = service.GetSubscriptions();
                Assert.Equal(subs.Count(), 3);

                subs = service.GetSubscriptions(false);
                Assert.Equal(subs.Count(), 4);

                subs = service.GetSubscriptions(client2Id);
                Assert.Equal(subs.Count(), 1);
                Assert.True(subs.All(sub => Guid.Parse(sub.Client.ID) == Guid.Parse(client2Id) || Guid.Parse(sub.Client.__PrimaryKey.ToString()) == Guid.Parse(client2Id)));

                subs = service.GetSubscriptions(client2Id, false);
                Assert.Equal(subs.Count(), 1);
                Assert.True(subs.All(sub => Guid.Parse(sub.Client.ID) == Guid.Parse(client2Id) || Guid.Parse(sub.Client.__PrimaryKey.ToString()) == Guid.Parse(client2Id)));

                subs = service.GetCallbackSubscriptions();
                Assert.Equal(subs.Count(), 1);
                Assert.True(subs.All(sub => sub.IsCallback));

                subs = service.GetCallbackSubscriptions(false);
                Assert.Equal(subs.Count(), 2);
                Assert.True(subs.All(sub => sub.IsCallback));

                subs = service.GetSubscriptionsForMsgType(messageType2Id, client2Id);
                Assert.Equal(subs.Count(), 1);
                Assert.True(subs.All(sub => Guid.Parse(sub.MessageType.ID) == Guid.Parse(messageType2Id) || Guid.Parse(sub.MessageType.__PrimaryKey.ToString()) == Guid.Parse(messageType2Id)));

                subs = service.GetSubscriptionsForMsgType(messageType2Id);
                Assert.Equal(subs.Count(), 2);
                Assert.True(subs.All(sub => Guid.Parse(sub.MessageType.ID) == Guid.Parse(messageType2Id) || Guid.Parse(sub.MessageType.__PrimaryKey.ToString()) == Guid.Parse(messageType2Id)));
            }
        }