// Remove ourselves from the broadcaster
server.removeNotificationListener(broadcasterName, listener1);
// Test we get a notification from the broadcaster
broadcaster.doSomething();
assertEquals(0, listener1.count);
// Test we get a notification from the delegate
server.registerMBean(new Test(), new ObjectName("Test:foo=bar"));
assertEquals(1, listener1.count);