private String getValueFromJobConf(String keyValuePairs, String key) {
    if (keyValuePairs == null) {
      return null;
    }
    String[] keyValues = keyValuePairs.split(",");
    for (String kv : keyValues) {
      String[] parts = kv.split("=");
      if (key.equals(parts[0].trim())) {
        return parts[1].trim();
      }
    }
    return null;
  }
Sets up the environment and configurations

@param setHadoopCredProvider set hadoop credstore provider path
@param setHadoopCredstorePassword set HADOOP_CREDSTORE_PASSWORD env variable
@param setHiveCredPassword set HIVE_JOB_CREDSTORE_PASSWORD env variable
@param setHiveProviderPath set HiveConf.ConfVars.HIVE_SERVER2_JOB_CREDSTORE_LOCATION in the
         hive config
@throws Exception
ql/src/test/org/apache/hadoop/hive/ql/exec/TestHiveCredentialProviders.java