public void clearAllSubscriptions() {
        SubscriptionTreeCollector subsCollector = new SubscriptionTreeCollector();
        bfsVisit(subscriptions, subsCollector);
        
        List<Subscription> allSubscriptions = subsCollector.getResult();
        for (Subscription subscription : allSubscriptions) {
            removeSubscription(subscription.getTopic(), subscription.getClientId());
        }
    }
public void clearAllSubscriptions ( ) { SubscriptionTreeCollector subsCollector = new SubscriptionTreeCollector ( ) ; bfsVisit ( subscriptions , subsCollector ) ; List < Subscription > allSubscriptions = subsCollector . getResult ( ) ; for ( Subscription subscription : allSubscriptions ) { removeSubscription ( subscription . getTopic ( ) , subscription . getClientId ( ) ) ; } }
TODO implement testing