public void verifyPropertyParam(String param, String name)
    throws BadParam {
    verifyParam(param, name);
    Matcher m = PROPERTY_ID.matcher(param);
    if (!m.matches()) {
      throw new BadParam("Invalid property name " + name);
    }
  }
@Test
  public void testVerifyPropertyParam() {
    // HIVE-15410: Though there are not restrictions to Hive table property key and it could be any
    // combination of the letters, digits and even punctuations, we support conventional property
    // name in WebHCat (e.g. prepery name starting with a letter or digit probably with period (.),
    // underscore (_) and hyphen (-) only in the middle like auto.purge, last_modified_by etc)
    String [] validTblProperties = {"abcd", "Abcd", "1Abcd", "abc1d", "Abcd.efgh", "Abcd-efgh",
        "Abcd_efgh", "A", "b", "1"};
    for (String propertyKey : validTblProperties) {
      try {
        server.verifyPropertyParam(propertyKey, ":property");
      } catch (Exception e) {
        fail(propertyKey + " should be a valid table property name in WebHCat.");
      }
    }

    String [] invalidTblProperties = {".abcd", "-Abcd", "_1Abcd", "abc1d.", "Abcd_", "Abcd-",
    "Abcd ", " Abcd", ".", "-", "_", " ", "$"};
    for (String propertyKey : invalidTblProperties) {
      boolean throwException = false;
      try {
        server.verifyPropertyParam(propertyKey, ":property");
      } catch (Exception e) {
        throwException = true;
      }
      if (!throwException) {
        fail(propertyKey + " should not be a valid table property name in WebHCat.");
      }
    }
  }