Utility function.
Fills this ProcessedInput with values.
This function iterates over parameter names list and loads corresponding value from MAp

@param valuesMap Map of values which would be loaded
165620
public void fillParameterValues(Map<String, Object> valuesMap) {
        AssertUtils.assertNotNull(valuesMap, "Value map cannot be null");

        if (this.sqlParameterNames != null) {

            String parameterName = null;
            this.sqlParameterValues = new ArrayList<Object>();

            // using for instead of iterator because this way I control position
            // I am getting.
            for (int i = 0; i < this.sqlParameterNames.size(); i++) {
                parameterName = this.sqlParameterNames.get(i);

                if (valuesMap.containsKey(parameterName) == true) {
                    this.sqlParameterValues.add(valuesMap.get(parameterName));
                } else {
                    throw new IllegalArgumentException(String.format(HandlersConstants.ERROR_PARAMETER_NOT_FOUND, parameterName));
                }
            }
        }
    }
1293047
private static void setValue(Map<String,String> map, String key, String value) {
		map.put(key,value);
	}
1355165
public static void addValue(String key, Object value, MultiValueMap<String, String> params) {
        if (value != null) {
            params.add(key, value.toString());
        }
    }
1195964
static Map<String, Object> valueAsMap(Map<String, Object> map, Key key, Map<String, Object> defaultValue) {
        if (map.containsKey(key.key)) {
            Object rawOrMap = map.get(key.key);
            if (rawOrMap instanceof Map) {
                @SuppressWarnings("unchecked")
                Map<String, Object> submap = (Map<String, Object>) rawOrMap;
                return submap;
            } else {
                return defaultValue;
            }
        }
        return defaultValue;
    }
903152
static Map<String, String> valueAsMapOfStrings(Map<String, Object> map, Key key, Map<String, String> defaultValue) {
        Map<String, Object> castedDefaultValue = new HashMap<String, Object>();
        castedDefaultValue.putAll(defaultValue);

        Map<String, Object> uncastedResult = valueAsMap(map, key, castedDefaultValue);
        Map<String, String> castedResult = new HashMap<String, String>();
        for (Map.Entry<String, Object> entry : uncastedResult.entrySet()) {
            castedResult.put(entry.getKey(), entry.getValue() == null ? null : entry.getValue().toString());
        }
        return castedResult;
    }
608474
public void append(Map<?, ?> map) {
		if (map == null || map.size() == 0)
			return;

		for (Map.Entry<?, ?> entry : map.entrySet()) {
			String key = StringConverter.toString(entry.getKey());
			Object value = entry.getValue();
			super.put(key, value);
		}
	}
286861
public void copyValuesFromTo(Map<String, Object> otherMap, Map<String, Object> map) {
        getMapHelper().copyValuesFromTo(otherMap, map);
    }
259547
public static void init(final Map<String, String> _values)
    {
        if (AppConfigHandler.HANDLER == null) {
            AppConfigHandler.HANDLER = new AppConfigHandler(_values);
        }
    }
477191
@Override
    public Future<?> loadValues(List<Data> keys, boolean replaceExistingValues) {
        Callable task = new GivenKeysLoaderTask(keys, replaceExistingValues);
        return executeTask(MAP_LOADER_EXECUTOR, task);
    }
1278074
private void readMultiMapKeys(XMLEventReader reader, MultiValueMap<String> map)
            throws XMLStreamException, JournalException {
        while (true) {
            XMLEvent event2 = reader.nextTag();
            if (isStartTagEvent(event2, QNAME_TAG_MULTI_VALUE_MAP_KEY)) {
                // if we find a key tag, get the name
                String key =
                        getRequiredAttributeValue(event2.asStartElement(),
                                                  QNAME_ATTR_NAME);
                // read as many values as we find.
                String[] values = readMultiMapValuesForKey(reader);
                // store in the map
                storeInMultiMap(map, key, values);
            } else if (isEndTagEvent(event2, QNAME_TAG_MULTI_VALUE_MAP)) {
                break;
            } else {
                throw getNotNextMemberOrEndOfGroupException(QNAME_TAG_MULTI_VALUE_MAP,
                                                            QNAME_TAG_MULTI_VALUE_MAP_KEY,
                                                            event2);
            }
        }
    }
770856
public void populate(Map<String, String[]> map)
    {
        for (Entry<String, String[]> entry : map.entrySet())
        {
            String property = entry.getKey();
            if (model.typeMap.containsKey(property))
            {
                String[] values = entry.getValue();
                if (values.length > 1)
                {
                    throw new UnsupportedOperationException(property + " has multivalue " + values);
                }
                if (values.length == 1)
                {
                    set(property, values[0]);
                }
            }
        }
    }
333514
private void fillColumnValuesMap(List<Map<String, Object>> results, Map<String, List<String>> columnValuesMap) {
        for (Map<String, Object> row : results) {
            for (Entry<String, Object> column : row.entrySet()) {
                String columnValue;
                String columnName = column.getKey();
                if (!columnValuesMap.containsKey(columnName)) {
                    columnValuesMap.put(columnName, new ArrayList<String>());
                }

                if (column.getValue() instanceof byte[]) {
                    columnValue = Base64.encodeBase64String((byte[]) column.getValue());
                } else {
                    columnValue = column.getValue() == null ? null : column.getValue().toString();
                }

                columnValuesMap.get(columnName).add((columnValue));
            }
        }
    }

    /**
     * Gets the script validator implementation either autowired from application context
     * or if not set here a default implementation.
     */
    private SqlResultSetScriptValidator getScriptValidator() {
        if (validator != null) {
            return validator;
        } else {
            return new GroovySqlResultSetValidator();
        }
    }

    /**
     * Constructs a delimited string from multiple row values in result set in order to
     * set this expression as variable value.
     *
     * @param rowValues the list of values representing the allResultRows for a column in the result set.
     * @return the variable value as delimited string or single value.
     */
    private String constructVariableValue(List<String> rowValues) {
        if (CollectionUtils.isEmpty(rowValues)) {
            return "";
        } else if (rowValues.size() == 1) {
            return rowValues.get(0) == null ? NULL_VALUE : rowValues.get(0);
        } else {
            StringBuilder result = new StringBuilder();

            Iterator<String> it = rowValues.iterator();

            result.append(it.next());
            while (it.hasNext()) {
                String nextValue = it.next();
                result.append(";" + (nextValue == null ? NULL_VALUE : nextValue));
            }

            return result.toString();
        }
    }

    /**
     * Validates the database result set. At first script validation is done (if any was given).
     * Afterwards the control result set validation is performed.
     *
     * @param columnValuesMap map containing column names as keys and list of string as retrieved values from db
     * @param allResultRows list of all result rows retrieved from database
     * @return success flag
     * @throws UnknownElementException
     * @throws ValidationException
     */
    private void performValidation(final Map<String, List<String>> columnValuesMap,
            List<Map<String, Object>> allResultRows, TestContext context)
            throws UnknownElementException, ValidationException {
        // apply script validation if specified
        if (scriptValidationContext != null) {
            getScriptValidator().validateSqlResultSet(allResultRows, scriptValidationContext, context);
        }

        //now apply control set validation if specified
        if (CollectionUtils.isEmpty(controlResultSet)) {
            return;
        }
        performControlResultSetValidation(columnValuesMap, context);
        log.info("SQL query validation successful: All values OK");
    }

    private void performControlResultSetValidation(final Map<String, List<String>> columnValuesMap, TestContext context)
            throws CitrusRuntimeException {
        for (Entry<String, List<String>> controlEntry : controlResultSet.entrySet()) {
            String columnName = controlEntry.getKey();

            if (columnValuesMap.containsKey(columnName.toLowerCase())) {
                columnName = columnName.toLowerCase();
            } else if (columnValuesMap.containsKey(columnName.toUpperCase())) {
                columnName = columnName.toUpperCase();
            } else if (!columnValuesMap.containsKey(columnName)) {
                throw new CitrusRuntimeException("Could not find column '" + columnName + "' in SQL result set");
            }

            List<String> resultColumnValues = columnValuesMap.get(columnName);
            List<String> controlColumnValues = controlEntry.getValue();

            // first check size of column values (representing number of allResultRows in result set)
            if (resultColumnValues.size() != controlColumnValues.size()) {
                throw new CitrusRuntimeException("Validation failed for column: '" +  columnName + "' " +
                        "expected rows count: " + controlColumnValues.size() + " but was " + resultColumnValues.size());
            }

            Iterator<String> it = resultColumnValues.iterator();
            for (String controlValue : controlColumnValues) {
                String resultValue = it.next();
                //check if controlValue is variable or function (and resolve it)
                controlValue = context.replaceDynamicContentInString(controlValue);

                validateSingleValue(columnName, controlValue, resultValue, context);
            }
        }
    }

    /**
     * Does some simple validation on the SQL statement.
     * @param stmt The statement which is to be validated.
     */
    protected void validateSqlStatement(String stmt) {
        if (!stmt.toLowerCase().startsWith("select")) {
            throw new CitrusRuntimeException("Missing keyword SELECT in statement: " + stmt);
        }
    }

    protected void validateSingleValue(String columnName, String controlValue, String resultValue, TestContext context) {
        // check if value is ignored
        if (controlValue.equals(Citrus.IGNORE_PLACEHOLDER)) {
            if (log.isDebugEnabled()) {
                log.debug("Ignoring column value '" + columnName + "(resultValue)'");
            }
            return;
        }
        
        if (ValidationMatcherUtils.isValidationMatcherExpression(controlValue)) {
            ValidationMatcherUtils.resolveValidationMatcher(columnName, resultValue, controlValue, context);
            return;
        }
        
        if (resultValue == null) {
            if (isCitrusNullValue(controlValue)) {
                if (log.isDebugEnabled()) {
                    log.debug("Validating database value for column: ''" +
                            columnName + "'' value as expected: NULL - value OK");
                }
                return;
            } else {
                throw new ValidationException("Validation failed for column: '" +  columnName + "'"
                        + "found value: NULL expected value: " + controlValue);
            }
        }

        if (resultValue.equals(controlValue)) {
            if (log.isDebugEnabled()) {
                log.debug("Validation successful for column: '" + columnName +
                        "' expected value: " + controlValue + " - value OK");
            }
        } else {
            throw new ValidationException("Validation failed for column: '" +  columnName + "'"
                    + " found value: '"
                    + resultValue
                    + "' expected value: "
                    + ((controlValue.length()==0) ? NULL_VALUE : controlValue));
        }
    }
148138
public void putAll(String[] names, Object[] values) {
        for (int i = 0, len = Math.min(names.length, values.length); i < len; i++)
            objectMap.put(names[i], values[i]);
    }
862519
function SetCache(values) {
        var index = -1,
            length = values == null ? 0 : values.length;

        this.__data__ = new MapCache();
        while (++index < length) {
            this.add(values[index]);
        }
    }
1277813
public static <K, V> ImmutableMap<K, V> loadMap(final File file,
      final Function<String, K> keyFunction, final Function<String, V> valueFunction)
      throws IOException {
    return loadMap(Files.asCharSource(file, Charsets.UTF_8), keyFunction, valueFunction);
  }
1209647
public static <T> void removeValue(Map<?,T> map, T value) {
		ArrayList<Object> keys = new ArrayList<>();
		for (Map.Entry<?,T> e : map.entrySet())
			if (e.getValue().equals(value))
				keys.add(e.getKey());
		for (Object key : keys)
			map.remove(key);
	}
344762
private MValue setInMap(String key, MValue value) {
        newKey.add(key);
        valueMap.put(key, value);
        return value;
    }