code: public static Map<String, String> buildHeadersMapFromString(String headerString) {
          Map<String, String> headersMap = new HashMap<>();
          if (headerString != null) {
              String[] headers = headerString.split("\\|");
              for (String header : headers) {
                  String[] keyValPair = header.split(":");
                  if (keyValPair.length == 2) {
                      headersMap.put(keyValPair[0].trim(), keyValPair[1].trim());
                  }
              }
          }
          return headersMap;
      }
docs: A utility method to build headers map from the string. Multiple headers in the string would be separated by |
  and the header key and value/s would be separated by :
  
  Example String: X-Requested-By: applicationOne | Accepts: *.* | Custom-Header: Custom Value
  
  @param headerString the string to parse and build the map from. Ex. HeaderName: value | HeaderName: value
  @return Map the map of headers where key is string and value is also string