### Question:
ZookeeperRegistry extends FailbackRegistry { static String appendDefaultPort(String address) { if (address != null && address.length() > 0) { int i = address.indexOf(':'); if (i < 0) { return address + ":" + DEFAULT_ZOOKEEPER_PORT; } else if (Integer.parseInt(address.substring(i + 1)) == 0) { return address.substring(0, i + 1) + DEFAULT_ZOOKEEPER_PORT; } } return address; } ZookeeperRegistry(URL url, ZookeeperTransporter zookeeperTransporter); @Override boolean isAvailable(); @Override void destroy(); @Override void doRegister(URL url); @Override void doUnregister(URL url); @Override void doSubscribe(final URL url, final NotifyListener listener); @Override void doUnsubscribe(URL url, NotifyListener listener); @Override List<URL> lookup(URL url);  }### Answer:
@Test public void testDefaultPort() { Assertions.assertEquals("10.20.153.10:2181", ZookeeperRegistry.appendDefaultPort("10.20.153.10:0")); Assertions.assertEquals("10.20.153.10:2181", ZookeeperRegistry.appendDefaultPort("10.20.153.10")); }