@Override
  public Ring<T> createRing(Map<T, Integer> pointsMap) {
    return _ringFactory.createRing(pointsMap);
  }
@Test(groups = { "small", "back-end" })
  public void testRandomChangePoints()
      throws URISyntaxException
  {
    int pointNum = 5;
    int loopNum = 100;
    Map<String, Integer> pointsMp = buildPointsMap(pointNum);
    Map<String, Integer> maxPoints = new HashMap<>(pointNum);
    Random random = new Random();

    for (String uri : pointsMp.keySet()) {
      maxPoints.put(uri, 100);
    }

    PointBasedConsistentHashRingFactory<String> ringFactory = new PointBasedConsistentHashRingFactory<>(new DegraderLoadBalancerStrategyConfig(1L));
    Ring<String>  ring = ringFactory.createRing(pointsMp);
    assertNotNull(ring.get(1000));

    for (int i = 0; i < loopNum; ++i) {
      // new point list
      for (String uri : pointsMp.keySet()) {
        int newPoints = random.nextInt(200);
        if (newPoints == 0) {
          continue;
        }
        pointsMp.put(uri, newPoints);
        if (newPoints > maxPoints.get(uri)) {
          maxPoints.put(uri, ((newPoints + 3) / 4) * 4);
        }
      }
      ring = ringFactory.createRing(pointsMp);
      assertNotNull(ring.get(1000));
      Map<String, List<Point<String>>> pointList = ringFactory.getPointsMap();
      for (String uri : pointsMp.keySet()) {
        assertEquals ((int)maxPoints.get(uri), pointList.get(uri).size());
      }
    }
  }