pauseRequest.addNewPauseSubscription();
broker.getSubscriptionManager().pauseSubcription(pauseRequest, subRef);
// The sub should be stopped and we should not be getting notifed now.
sendNotification(broker);
subNotifyDoc = (NotifyDocument) result.poll(2000);
assertNull(subNotifyDoc);
// Resume the subscription.
ResumeSubscriptionDocument resumeRequest = ResumeSubscriptionDocument.Factory.newInstance();
resumeRequest.addNewResumeSubscription();