NotificationEmitter proxy = (NotificationEmitter)MBeanServerInvocationHandler.newProxyInstance(server, name, NotificationEmitter.class, true);
TestListener listener = new TestListener();
TestFilter filter = new TestFilter();
Object handback = new Object();
proxy.addNotificationListener(listener, filter, handback);
proxy.removeNotificationListener(listener, filter, handback);
mbean.test();
if (listener.received) fail();
}