EtcdUtils { public static List<URI> parse(EtcdServerSettings settings) { List<URI> uris = new ArrayList<>(); try { LOGGER.info("etcd settings is {}", settings); List<Address> addressList = ConnectUtils.parse(settings.getServerAddr()); for (Address address : addressList) { uris.add(new URI("http", null, address.getHost(), address.getPort(), null, null, null)); } } catch (Exception e) { throw new EtcdConfigException(e.getMessage(), e); } return uris; } EtcdUtils(); static List<URI> parse(EtcdServerSettings settings); static List<URI> parseProp(Properties properties);  }
@Test public void testParse() { List<URI> list = EtcdUtils.parse(settings); Assert.assertEquals(1, list.size()); URI uri = list.get(0); Assert.assertEquals("http", uri.getScheme()); Assert.assertEquals("localhost", uri.getHost()); Assert.assertEquals(2379, uri.getPort()); }