ConsulUtils { public static String getPathFromServiceId(String serviceId) { return serviceId.substring(serviceId.indexOf("-") + 1); }  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 testGetPathFromServiceId() { String tempPath = ConsulUtils.getPathFromServiceId(testServiceId); assertEquals(testPath, tempPath); }