assertSame("The 'source' property of the Notification is not being set to the ObjectName of the associated MBean.", objectName, mbean.getActualNotification().getSource());
}
public void testSendAttributeChangeNotificationWhereSourceIsNotTheManagedResource() throws Exception {
StubSpringModelMBean mbean = new StubSpringModelMBean();
Notification notification = new AttributeChangeNotification(this, 1872, System.currentTimeMillis(), "Shall we break for some tea?", "agree", "java.lang.Boolean", Boolean.FALSE, Boolean.TRUE);
ObjectName objectName = createObjectName();
NotificationPublisher publisher = new ModelMBeanNotificationPublisher(mbean, objectName, mbean);
publisher.sendNotification(notification);