code: private static Map<String, String> parseKeyValueMap(String kvString, Function<String, String> valueMapper) {
          return Stream.of(
                  Optional.ofNullable(kvString)
                          .map(StringUtils::trimAllWhitespace)
                          .filter(StringUtils::hasText)
                          .map(s -> s.split(PAIR_SEPARATOR))
                          .orElse(new String[0]))
                  .map(StringUtils::trimAllWhitespace)
                  .map(pair -> pair.split(KEY_VALUE_SEPARATOR, 2))
                  .collect(toMap(
                          FIRST.andThen(StringUtils::trimAllWhitespace),
                          SECOND.andThen(StringUtils::trimAllWhitespace).andThen(valueMapper)));
      }
docs: Parses a key-value pair string such as "param1=WdfaA,param2=AZrr,param3" into a map.
  
  <p>Keys with no value are assigned an empty string for convenience. The `valueMapper` function is applied to
  all values of the map</p>
  
  @param kvString    a string containing key value pairs. Multiple pairs are separated by comma ','
  and the keys are separated from the values by the equal sign "="
  @param valueMapper a function that will be applied to the parsed values. Use Functions.identity to keep the original value.
  @return a String-String Map