### Question:
OverrideDubboConfigApplicationListener implements ApplicationListener<ApplicationEnvironmentPreparedEvent> { @Override public void onApplicationEvent(ApplicationEnvironmentPreparedEvent event) { final Logger logger = LoggerFactory.getLogger(getClass()); ConfigurableEnvironment environment = event.getEnvironment(); boolean override = environment.getProperty(OVERRIDE_CONFIG_FULL_PROPERTY_NAME, boolean.class, DEFAULT_OVERRIDE_CONFIG_PROPERTY_VALUE); if (override) { SortedMap<String, Object> dubboProperties = filterDubboProperties(environment); ConfigUtils.getProperties().putAll(dubboProperties); if (logger.isInfoEnabled()) { logger.info("Dubbo Config was overridden by externalized configuration {}", dubboProperties); } } else { if (logger.isInfoEnabled()) { logger.info("Disable override Dubbo Config caused by property {} = {}", OVERRIDE_CONFIG_FULL_PROPERTY_NAME, override); } } }  @Override void onApplicationEvent(ApplicationEnvironmentPreparedEvent event);  }### Answer:
@Test public void testOnApplicationEvent() { Properties properties = ConfigUtils.getProperties(); Assert.assertEquals("dubbo-demo-application", properties.get("dubbo.application.name")); Assert.assertEquals("dubbo-demo-module", properties.get("dubbo.module.name")); Assert.assertEquals("zookeeper: }