docs: public void init(Map<String, String> testConfig, Map<String, String> hiveVars) {
  
          context.init();
  
          HiveConf hiveConf = context.getHiveConf();
  
          // merge test case properties with hive conf before HiveServer is started.
          for (Map.Entry<String, String> property : testConfig.entrySet()) {
              hiveConf.set(property.getKey(), property.getValue());
          }
  
          try {
              hiveServer2 = new HiveServer2();
              hiveServer2.init(hiveConf);
  
              // Locate the ClIService in the HiveServer2
              for (Service service : hiveServer2.getServices()) {
                  if (service instanceof CLIService) {
                      client = (CLIService) service;
                  }
              }
  
              Preconditions.checkNotNull(client, "ClIService was not initialized by HiveServer2");
  
              sessionHandle = client.openSession("noUser", "noPassword", null);
  
              SessionState sessionState = client.getSessionManager().getSession(sessionHandle).getSessionState();
              currentSessionState = sessionState;
              currentSessionState.setHiveVariables(hiveVars);
          } catch (Exception e) {
              throw new IllegalStateException("Failed to create HiveServer :" + e.getMessage(), e);
          }
  
          // Ping hive server before we do anything more with it! If validation
          // is switched on, this will fail if metastorage is not set up properly
          pingHiveServer();
      }