JMXNotifier extends AbstractActiveChangeListener implements JMXNotifierMBean, javax.management.NotificationEmitter { public void removeNotificationListener(NotificationListener l) throws ListenerNotFoundException { boolean f_found=false; for (int i=_notificationDetails.size()-1; i >= 0; i--) { NotificationDetails n=_notificationDetails.get(i); if (n.getListener() == l) { _notificationDetails.remove(i); f_found = true; } } if (!f_found) { throw new ListenerNotFoundException(); } }  void setObjectName(String name); String getObjectName(); void setDescriptionScript(String script); String getDescriptionScript(); void setInsertType(String type); String getInsertType(); void setInsertTypeScript(String script); String getInsertTypeScript(); void setUpdateType(String type); String getUpdateType(); void setUpdateTypeScript(String script); String getUpdateTypeScript(); void setRemoveType(String type); String getRemoveType(); void setRemoveTypeScript(String script); String getRemoveTypeScript(); void inserted(Object key, Object value); void updated(Object key, Object value); void removed(Object key, Object value); void addNotificationListener(NotificationListener l,
            NotificationFilter filter, Object handback); MBeanNotificationInfo[] getNotificationInfo(); void removeNotificationListener(NotificationListener l); void removeNotificationListener(NotificationListener l,
            NotificationFilter filter, Object handback);  }
@Test public void testNotificationListenerNotFound() { JMXNotifier notifier=new JMXNotifier(); NotificationListener l=new NotificationListener() { public void handleNotification(Notification notification, Object handback) { } }; try { notifier.removeNotificationListener(l); fail("Should have failed to remove listener"); } catch (Exception e) { } }