throws ConfigurationException
{
final BasicConfigurationBuilder<PropertiesConfiguration> builder =
new BasicConfigurationBuilder<PropertiesConfiguration>(
PropertiesConfiguration.class);
PropertiesConfiguration configuration = builder.getConfiguration();
BuilderEventListenerImpl listener = new BuilderEventListenerImpl();
builder.addEventListener(ConfigurationBuilderEvent.RESET, listener);
builder.addEventListener(
ConfigurationBuilderEvent.CONFIGURATION_REQUEST,
new EventListener<ConfigurationBuilderEvent>()
{
@Override
public void onEvent(ConfigurationBuilderEvent event)
{
builder.resetResult();
}
});
PropertiesConfiguration configuration2 = builder.getConfiguration();
assertNotSame("Configuration not reset", configuration, configuration2);
listener.nextEvent(ConfigurationBuilderEvent.RESET);
listener.assertNoMoreEvents();
}