ConsulUtils { public static String convertConsulSerivceId(URL url) { if (url == null) { return null; } return convertServiceId(url.getHost(), url.getPort(), url.getPath()); }  static boolean isSame(List<URL> urls1, List<URL> urls2); static ConsulService buildService(URL url); static URL buildUrl(ConsulService service); static String getUrlClusterInfo(URL url); static String convertGroupToServiceName(String group); static String getGroupFromServiceName(String group); static String convertConsulSerivceId(URL url); static String getPathFromServiceId(String serviceId); static String getProtocolFromTag(String tag); static String convertServiceId(String host, int port, String path);  }
@Test public void testConvertConsulSerivceId() { String tempServiceId = ConsulUtils.convertConsulSerivceId(url); assertEquals(testServiceId, tempServiceId); }