private void checkPriorityIfWaiting() {
      if (STATE.get() == State.WAITING) {
        int priority = RpcServer.getCurrentCall().get().getPriority();
        if (priority < MIN_CUSTOM_PRIORITY) {
          return;
        }
        assertEquals(EXPECTED_PRIORITY.get(), priority);
        STATE.set(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