CacheableEventPublishingNacosServiceFactory implements NacosServiceFactory { @Override public ConfigService createConfigService(Properties properties) throws NacosException { Properties copy = new Properties(); copy.putAll(properties); return (ConfigService) createWorkerManager.get(ServiceType.CONFIG).run(copy, null); } CacheableEventPublishingNacosServiceFactory(); static CacheableEventPublishingNacosServiceFactory getSingleton(); @Override ConfigService createConfigService(Properties properties); @Override NamingService createNamingService(Properties properties); @Override NamingMaintainService createNamingMaintainService(Properties properties); T deferCreateService(T service, Properties properties); @SuppressWarnings("unchecked") void publishDeferService(ApplicationContext context); void setApplicationContext(ApplicationContext applicationContext); @Override Collection<ConfigService> getConfigServices(); @Override Collection<NamingService> getNamingServices(); @Override Collection<NamingMaintainService> getNamingMaintainService();  }
@Test public void testCreateConfigService() throws NacosException { ConfigService configService = nacosServiceFactory.createConfigService(properties); ConfigService configService2 = nacosServiceFactory .createConfigService(properties); Assert.assertTrue(configService == configService2); }