### Question:
DefaultSubscriptionTreeMatcher implements SubscriptionMatcher { @Override public Set<Subscription> match(String topic) { Set<Subscription> subscriptions = new HashSet<>(); recursionMatch(topic,root,subscriptions); return subscriptions; } DefaultSubscriptionTreeMatcher(); @Override boolean subscribe(Subscription subscription); @Override boolean unSubscribe(String topic, String clientId); @Override Set<Subscription> match(String topic); @Override boolean isMatch(String pubTopic, String subTopic);  }### Answer:
@Test public void match() { String[] topics = new String[4]; String[] clientIds = new String[10]; for(int i = 0; i < 4; i++){ topics[i] = "T_TEST_" + i; } for(int i = 0; i < 10; i++){ clientIds[i] = "C_clientId_" + i; String topic = topics[i%4]; Subscription subscription = new Subscription(clientIds[i],topic,1); subscriptionMatcher.subscribe(subscription); } Set<Subscription> subscriptions = new HashSet<>(); for(int i = 0; i < 4; i++){ Set<Subscription> tempCientIds = subscriptionMatcher.match("T_TEST_"+i); subscriptions.addAll(tempCientIds); } }