@Test
  public void testHeapOccupancyPolicy() {
    Configuration conf = new Configuration(false);
    ExponentialClientBackoffPolicy backoff = new ExponentialClientBackoffPolicy(conf);

    ServerStatistics stats = new ServerStatistics();
    long backoffTime;

    update(stats, 0, 95, 0);
    backoffTime = backoff.getBackoffTime(server, regionname, stats);
    assertTrue("Heap occupancy at low watermark had no effect", backoffTime > 0);

    long previous = backoffTime;
    update(stats, 0, 96, 0);
    backoffTime = backoff.getBackoffTime(server, regionname, stats);
    assertTrue("Increase above low watermark should have increased backoff",
      backoffTime > previous);

    update(stats, 0, 98, 0);
    backoffTime = backoff.getBackoffTime(server, regionname, stats);
    assertEquals("We should be using max backoff when at high watermark",
      ExponentialClientBackoffPolicy.DEFAULT_MAX_BACKOFF, backoffTime);
  }
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