### Question:
AbstractInterfaceConfig extends AbstractMethodConfig { protected List<URL> loadRegistries(boolean provider) { checkRegistry(); checkRegistryDataConfig(); List<URL> registryList = new ArrayList<URL>(); if (CollectionUtils.isNotEmpty(registries)) { Map<String, String> registryDataConfigurationMap = new HashMap<>(4); appendParameters(registryDataConfigurationMap, registryDataConfig); for (RegistryConfig config : registries) { String address = config.getAddress(); if (StringUtils.isEmpty(address)) { address = Constants.ANYHOST_VALUE; } if (!RegistryConfig.NO_AVAILABLE.equalsIgnoreCase(address)) { Map<String, String> map = new HashMap<String, String>(); appendParameters(map, application); appendParameters(map, config); map.put("path", RegistryService.class.getName()); appendRuntimeParameters(map); if (!map.containsKey("protocol")) { map.put("protocol", "dubbo"); } List<URL> urls = UrlUtils.parseURLs(address, map); for (URL url : urls) { url = url.addParameter(Constants.REGISTRY_KEY, url.getProtocol()); url = url.setProtocol(Constants.REGISTRY_PROTOCOL); url = url.addParametersIfAbsent(registryDataConfigurationMap); if ((provider && url.getParameter(Constants.REGISTER_KEY, true)) || (!provider && url.getParameter(Constants.SUBSCRIBE_KEY, true))) { registryList.add(url); } } } } } return registryList; }  @Deprecated String getLocal(); @Deprecated void setLocal(Boolean local); @Deprecated void setLocal(String local); String getStub(); void setStub(Boolean stub); void setStub(String stub); String getCluster(); void setCluster(String cluster); String getProxy(); void setProxy(String proxy); Integer getConnections(); void setConnections(Integer connections); @Parameter(key = Constants.REFERENCE_FILTER_KEY, append = true) String getFilter(); void setFilter(String filter); @Parameter(key = Constants.INVOKER_LISTENER_KEY, append = true) String getListener(); void setListener(String listener); String getLayer(); void setLayer(String layer); ApplicationConfig getApplication(); void setApplication(ApplicationConfig application); ModuleConfig getModule(); void setModule(ModuleConfig module); RegistryConfig getRegistry(); void setRegistry(RegistryConfig registry); List<RegistryConfig> getRegistries(); @SuppressWarnings({"unchecked"}) void setRegistries(List<? extends RegistryConfig> registries); @Parameter(excluded = true) String getRegistryIds(); void setRegistryIds(String registryIds); MonitorConfig getMonitor(); void setMonitor(String monitor); void setMonitor(MonitorConfig monitor); String getOwner(); void setOwner(String owner); RegistryDataConfig getRegistryDataConfig(); void setRegistryDataConfig(RegistryDataConfig registryDataConfig); Integer getCallbacks(); void setCallbacks(Integer callbacks); String getOnconnect(); void setOnconnect(String onconnect); String getOndisconnect(); void setOndisconnect(String ondisconnect); String getScope(); void setScope(String scope); MetadataReportConfig getMetadataReportConfig(); void setMetadataReportConfig(MetadataReportConfig metadataReportConfig);  }### Answer:
@Test public void testLoadRegistries() { System.setProperty("dubbo.registry.address", "addr1"); InterfaceConfig interfaceConfig = new InterfaceConfig(); List<URL> urls = interfaceConfig.loadRegistries(true); Assertions.assertEquals(1, urls.size()); URL url = urls.get(0); Assertions.assertEquals("registry", url.getProtocol()); Assertions.assertEquals("addr1:9090", url.getAddress()); Assertions.assertEquals(RegistryService.class.getName(), url.getPath()); Assertions.assertTrue(url.getParameters().containsKey("timestamp")); Assertions.assertTrue(url.getParameters().containsKey("pid")); Assertions.assertTrue(url.getParameters().containsKey("registry")); Assertions.assertTrue(url.getParameters().containsKey("dubbo")); }