private void testForCall(ThrowingCallable callable) throws Exception {
    STATE.set(State.WAITING);
    // set it higher than MIN_CUSTOM_PRIORITY so we can ignore calls for meta, setup, etc
    EXPECTED_PRIORITY.set(new Random().nextInt(MIN_CUSTOM_PRIORITY) + MIN_CUSTOM_PRIORITY);
    callable.call();

    assertEquals("Expected state to change to SUCCESS. Check for assertion error in logs",
      STATE.get(), State.SUCCESS);
  }
Tests that one can implement their own RpcControllerFactory and expect it to successfully pass
custom priority values to the server for all HTable calls.
hbase-server/src/test/java/org/apache/hadoop/hbase/TestCustomPriorityRpcControllerFactory.java