154155156157158159160161162163164
assertEquals(1, v.size()); assertEquals(false, v.contains("type1")); assertEquals(true, v.contains("type2")); // Remove all nfs.enableType("type2"); nfs.disableAllTypes(); v = nfs.getEnabledTypes(); assertEquals(0, v.size()); // Test duplication
650651652653654655656657658659660
} public MBeanServerNotificationFilter createMBeanServerNotificationFilter() throws MalformedObjectNameException { MBeanServerNotificationFilter filter = new MBeanServerNotificationFilter(); filter.enableType("notif-type"); filter.disableAllObjectNames(); filter.enableObjectName(new ObjectName("domain:key=val")); return filter; }