@Test
  public void testResultOrdering() {
    Configuration conf = new Configuration(false);
    // make the max timeout really high so we get differentiation between load factors
    conf.setLong(ExponentialClientBackoffPolicy.MAX_BACKOFF_KEY, Integer.MAX_VALUE);
    ExponentialClientBackoffPolicy backoff = new ExponentialClientBackoffPolicy(conf);

    ServerStatistics stats = new ServerStatistics();
    long previous = backoff.getBackoffTime(server, regionname, stats);
    for (int i = 1; i <= 100; i++) {
      update(stats, i);
      long next = backoff.getBackoffTime(server, regionname, stats);
      assertTrue("Previous backoff time" + previous + " >= " + next + ", the next backoff time for "
        + "load " + i, previous < next);
      previous = next;
    }
  }
Make sure that we get results in the order that we expect - backoff for a load of 1 should less
than backoff for 10, which should be less than that for 50.
hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientExponentialBackoff.java