builder.addEventListener(ConfigurationEvent.ANY_HIERARCHICAL,
l1);
builder.addEventListener(ConfigurationEvent.ANY, l2);
assertTrue("Wrong result",
builder.removeEventListener(ConfigurationEvent.ANY, l2));
PropertiesConfiguration config = builder.getConfiguration();
assertFalse("Removed listener was registered", config
.getEventListeners(ConfigurationEvent.ANY).contains(l2));
assertTrue("Listener not registered",
config.getEventListeners(ConfigurationEvent.ANY_HIERARCHICAL)
.contains(l1));
builder.removeEventListener(
ConfigurationEvent.ANY_HIERARCHICAL, l1);
assertFalse("Listener still registered",
config.getEventListeners(ConfigurationEvent.ANY_HIERARCHICAL)
.contains(l1));
}