Collection<Subscription> subscriptions = manager.getSubscriptionsByMessageType(messageType);
ensureOrdering(subscriptions);
Collection<ValidationEntry> validationEntries = getEntries(EntriesByMessageType(messageType));
assertEquals(subscriptions.size(), validationEntries.size());
for(ValidationEntry validationValidationEntry : validationEntries){
Subscription matchingSub = null;
// one of the subscriptions must belong to the subscriber type
for(Subscription sub : subscriptions){
if(sub.belongsTo(validationValidationEntry.subscriber)){
matchingSub = sub;
break;
}
}
assertNotNull(matchingSub);
assertEquals(subscribedListener.getNumberOfListeners(validationValidationEntry.subscriber), matchingSub.size());
}
}
}