code: public static String replaceTokens(final String value,
        final Map<String, String> contextInfo, final boolean withEncoding) {
  
      String result = value;
      String tokenValue =
          encodeQueryParam(contextInfo.get(CONTEXT_SERVER_TOKEN), withEncoding);
      result = result.replaceFirst(Pattern.quote(CONTEXT_SERVER_TOKEN), tokenValue);
  
      tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_PROJECT_TOKEN), withEncoding);
      result = result.replaceFirst(Pattern.quote(CONTEXT_PROJECT_TOKEN), tokenValue);
  
      tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_FLOW_TOKEN), withEncoding);
      result = result.replaceFirst(Pattern.quote(CONTEXT_FLOW_TOKEN), tokenValue);
  
      tokenValue = encodeQueryParam(contextInfo.get(CONTEXT_JOB_TOKEN), withEncoding);
      result = result.replaceFirst(Pattern.quote(CONTEXT_JOB_TOKEN), tokenValue);
  
      tokenValue =
          encodeQueryParam(contextInfo.get(CONTEXT_EXECUTION_ID_TOKEN), withEncoding);
      result = result.replaceFirst(Pattern.quote(CONTEXT_EXECUTION_ID_TOKEN), tokenValue);
  
      tokenValue =
          encodeQueryParam(contextInfo.get(CONTEXT_JOB_STATUS_TOKEN), withEncoding);
  
      result = result.replaceFirst(Pattern.quote(CONTEXT_JOB_STATUS_TOKEN), tokenValue);
  
      return result;
    }
docs: Replace the supported tokens in the URL with values in the contextInfo. This will also make
  sure the values are HTTP encoded.
  
  @param withEncoding - whether the token values will be HTTP encoded
  @return String - value with tokens replaced with values