EventPublishingConfigService implements ConfigService, NacosServiceMetaData { @Override public boolean publishConfig(String dataId, String group, String content) throws NacosException { boolean published = configService.publishConfig(dataId, group, content); publishEvent(new NacosConfigPublishedEvent(configService, dataId, group, content, published)); return published; } EventPublishingConfigService(ConfigService configService,
			Properties properties, ConfigurableApplicationContext context,
			Executor executor); @Override String getConfig(String dataId, String group, long timeoutMs); @Override String getConfigAndSignListener(String dataId, String group, long timeoutMs,
			Listener listener); void addListener(String dataId, String group, String type, Listener listener); @Override void addListener(String dataId, String group, Listener listener); @Override boolean publishConfig(String dataId, String group, String content); @Override boolean removeConfig(String dataId, String group); @Override void removeListener(String dataId, String group, Listener listener); @Override String getServerStatus(); @Override Properties getProperties();  }
@Test public void testPublishConfigWithEvent() throws NacosException { context.addApplicationListener( new ApplicationListener<NacosConfigPublishedEvent>() { @Override public void onApplicationEvent(NacosConfigPublishedEvent event) { assertNacosConfigEvent(event); Assert.assertEquals(CONTENT, event.getContent()); Assert.assertTrue(event.isPublished()); } }); configService.publishConfig(DATA_ID, GROUP_ID, CONTENT); }