EndpointGroupUtil { @Nullable static String getEndpointGroupName(String uri) { final Matcher matcher = ENDPOINT_GROUP_PATTERN.matcher(uri); if (matcher.find()) { return matcher.group(2); } return null; } private  EndpointGroupUtil();   }
@Test public void testGetEndpointGroupName() throws Exception { assertNull(getEndpointGroupName("http: assertNull(getEndpointGroupName("http: assertNull(getEndpointGroupName("http: assertNull(getEndpointGroupName("http: assertEquals("myGroupName", getEndpointGroupName("http: assertEquals("myGroupName", getEndpointGroupName("http: assertEquals("myGroupName", getEndpointGroupName("http: assertEquals("myGroupName", getEndpointGroupName("http: "myGroupName:8080/")); }