private void verifyRestriction(String varName, String newVal) {
    try {
      conf.verifyAndSet(varName, newVal);
      fail("Setting config property " + varName + " should fail");
    } catch (IllegalArgumentException e) {
      // the verifyAndSet in this case is expected to fail with the IllegalArgumentException
    }
  }
Test appending new configs vars added to restrict list
@throws Exception
common/src/test/org/apache/hadoop/hive/conf/TestHiveConfRestrictList.java