assertNotSame("The instance is not unique", broker1, broker3);
assertNotSame("The instance is not unique", broker1, broker4);
}
public void testRegisterNotificationDispatcher() throws Exception {
EventBrokerService broker = CarbonEventBroker.getInstance("instance3");
NotificationManager notificationManager = new TestNotificationManager();
((CarbonEventBroker)broker).registerNotificationManager(notificationManager);
assertNotNull("Notification Manager is not set", broker.getNotificationManager());
assertSame("Invalid notification manager", notificationManager,
broker.getNotificationManager());
broker.registerEventDispatcher(new CarbonEventDispatcher());
assertTrue("Invalid dispatcher registration",
((TestNotificationManager)notificationManager).isEventDispatcherRegistered());
}