@Test
  public void testPamServicesAreNotConfigured() {
    thrown.expect(IllegalArgumentException.class);
    thrown.expectMessage(is(ConfVars.HIVE_SERVER2_PAM_SERVICES.varname + " are not configured."));
    hiveConf.setVar(ConfVars.HIVE_SERVER2_PAM_SERVICES, "");
    hiveConf.setBoolVar(ConfVars.HIVE_SERVER2_WEBUI_USE_SSL, true);
    hiveConf.setVar(ConfVars.HIVE_SERVER2_WEBUI_SSL_KEYSTORE_PATH, sslKeyStorePath);
    hiveConf.setVar(ConfVars.HIVE_SERVER2_WEBUI_SSL_KEYSTORE_PASSWORD, keyStorePassword);
    hiveConf.setVar(ConfVars.HIVE_SERVER2_WEBUI_SSL_EXCLUDE_CIPHERSUITES, excludeSuites);
    hiveServer2 = new HiveServer2();
    hiveServer2.init(hiveConf);
  }
TestHS2HttpServerPamConfiguration -- checks configuration for HiveServer2 HTTP Server with Pam authentication
service/src/test/org/apache/hive/service/server/TestHS2HttpServerPamConfiguration.java