@Override
  public T get(int unused)
  {
    if (_cumulativePointsMap.isEmpty())
    {
      LOG.warn("Calling get on an empty ring, null value will be returned");
      return null;
    }
    int rand = ThreadLocalRandom.current().nextInt(_totalPoints);
    return _cumulativePointsMap.higherEntry(rand).getValue();
  }
@Test
  public void testLoadBalancingCapacity() throws Exception {
    Map<URI, Integer> pointsMap = new HashMap<>();
    Map<URI, Integer> countsMap = new HashMap<>();

    List<URI> goodHosts = addHostsToPointMap(10, 100, pointsMap);
    List<URI> averageHosts = addHostsToPointMap(10, 80, pointsMap);
    List<URI> badHosts = addHostsToPointMap(10, 40, pointsMap);

    goodHosts.forEach((host) -> {
      countsMap.put(host, 0);
    });
    averageHosts.forEach((host) -> {
      countsMap.put(host, 0);
    });
    badHosts.forEach((host) -> {
      countsMap.put(host, 0);
    });

    Ring<URI> ring = new DistributionNonDiscreteRingFactory<URI>().createRing(pointsMap);

    int trials = 100000;
    trial(trials, countsMap, ring);

    double goodAvg = goodHosts.stream().map((host) -> {
      return countsMap.get(host);
    }).reduce(0, (a, b) -> a + b) / goodHosts.size();

    double averageAvg = averageHosts.stream().map((host) -> {
      return countsMap.get(host);
    }).reduce(0, (a, b) -> a + b) / averageHosts.size();

    double badAvg = badHosts.stream().map((host) -> {
      return countsMap.get(host);
    }).reduce(0, (a, b) -> a + b) / badHosts.size();

    Assert.assertTrue(goodAvg > averageAvg);
    Assert.assertTrue(averageAvg > badAvg);
  }