/// <summary>
        /// Configures Rebus to use MongoDB to store subscriptions. Use <see cref="isCentralized"/> = true to indicate whether it's OK to short-circuit
        /// subscribing and unsubscribing by manipulating the subscription directly from the subscriber or just let it default to false to preserve the
        /// default behavior.
        /// </summary>
        public static void StoreInMongoDb(this StandardConfigurer <ISubscriptionStorage> configurer, MongoDatabase mongoDatabase, string collectionName, bool isCentralized = false)
        {
            if (configurer == null)
            {
                throw new ArgumentNullException("configurer");
            }
            if (mongoDatabase == null)
            {
                throw new ArgumentNullException("mongoDatabase");
            }
            if (collectionName == null)
            {
                throw new ArgumentNullException("collectionName");
            }

            configurer.Register(c =>
            {
                var subscriptionStorage = new MongoDbSubscriptionStorage(mongoDatabase, collectionName, isCentralized);

                return(subscriptionStorage);
            });
        }
 protected override void DoSetUp()
 {
     storage = new MongoDbSubscriptionStorage(ConnectionString, "subscriptions");
 }