@Override
    public URL select(List<URL> urls, String serviceId, String tag, String requestKey) {
        URL url = null;
        if (urls.size() > 1) {
            String key = tag == null ? serviceId : serviceId + "|" + tag;
            url = doSelect(urls, key);
        } else if (urls.size() == 1) {
            url = urls.get(0);
        }
        return url;
    }
@Test
    public void testSelect() throws Exception {
        List<URL> urls = new ArrayList<>();

        urls.add(new URLImpl("http", "127.0.0.1", 8081, "v1", new HashMap<String, String>()));
        urls.add(new URLImpl("http", "127.0.0.1", 8082, "v1", new HashMap<String, String>()));
        urls.add(new URLImpl("http", "127.0.0.1", 8083, "v1", new HashMap<String, String>()));
        urls.add(new URLImpl("http", "127.0.0.1", 8084, "v1", new HashMap<String, String>()));
        while(true) {
            URL url = loadBalance.select(urls, "serviceId", "tag", null);
            if(url.getPort() == 8081) break;
        }
        URL url = loadBalance.select(urls, "serviceId", "tag", null);
        Assert.assertEquals(url, URLImpl.valueOf("http://127.0.0.1:8082/v1"));
        url = loadBalance.select(urls, "serviceId", "tag", null);
        Assert.assertEquals(url, URLImpl.valueOf("http://127.0.0.1:8083/v1"));
        url = loadBalance.select(urls, "serviceId", "tag", null);
        Assert.assertEquals(url, URLImpl.valueOf("http://127.0.0.1:8084/v1"));
        url = loadBalance.select(urls, "serviceId", "tag", null);
        Assert.assertEquals(url, URLImpl.valueOf("http://127.0.0.1:8081/v1"));
        url = loadBalance.select(urls, "serviceId", "tag", null);
        Assert.assertEquals(url, URLImpl.valueOf("http://127.0.0.1:8082/v1"));

    }