@Override
    public Upstream doSelect(final List<Upstream> upstreamList, final String ip) {
        final ConcurrentSkipListMap<Long, Upstream> treeMap = new ConcurrentSkipListMap<>();
        upstreamList.forEach(upstream -> IntStream.range(0, VIRTUAL_NODE_NUM).forEach(i -> {
            long addressHash = hash("SHENYU-" + upstream.getUrl() + "-HASH-" + i);
            treeMap.put(addressHash, upstream);
        }));
        long hash = hash(ip);
        SortedMap<Long, Upstream> lastRing = treeMap.tailMap(hash);
        if (!lastRing.isEmpty()) {
            return lastRing.get(lastRing.firstKey());
        }
        return treeMap.firstEntry().getValue();
    }
@Test
    void doSelectWithSuccess() {
        final HashLoadBalancer hashLoadBalancer = new HashLoadBalancer();
        final List<Upstream> upstreamList = new ArrayList<>();
        upstreamList.add(Upstream.builder().url("http://1.1.1.1/api").build());
        upstreamList.add(Upstream.builder().url("http://2.2.2.2/api").build());
        upstreamList.add(Upstream.builder().url("http://3.3.3.3/api").build());

        final Upstream upstream = hashLoadBalancer.doSelect(upstreamList, "127.0.0.1");
        assertEquals(upstreamList.get(2).getUrl(), upstream.getUrl());
    }