docs: public static String replacePropertiesInString(final String line, Properties properties) {
          StringBuffer newStr = new StringBuffer();
  
          boolean isVarComplete = false;
  
          StringBuffer propertyName = new StringBuffer();
  
          int startIndex = 0;
          int curIndex;
          int searchIndex;
          while ((searchIndex = line.indexOf(PROPERTY_MARKER, startIndex)) != -1) {
              //first check if property Marker is escaped by '\' character
              if (searchIndex != 0 && line.charAt((searchIndex-1)) == '\\') {
                  newStr.append(line.substring(startIndex, searchIndex-1));
                  newStr.append(PROPERTY_MARKER);
                  startIndex = searchIndex + 1;
                  continue;
              }
              
              isVarComplete = false;
              
              curIndex = searchIndex + 1;
  
              while (curIndex < line.length() && !isVarComplete) {
                  if ((line.charAt(curIndex) == PROPERTY_MARKER) || (curIndex+1 == line.length())) {
                      isVarComplete = true;
                  }
  
                  if (!isVarComplete) {
                      propertyName.append(line.charAt(curIndex));
                  }
                  ++curIndex;
              }
              
              if (!properties.containsKey(propertyName.toString())) {
                  throw new CitrusRuntimeException("No such property '"
                          + PROPERTY_MARKER + propertyName.toString() + PROPERTY_MARKER + "'");
              }
  
              newStr.append(line.substring(startIndex, searchIndex));
              newStr.append(properties.getProperty(propertyName.toString(), "")); // property value
  
              startIndex = curIndex;
  
              propertyName = new StringBuffer();
              isVarComplete = false;
          }
  
          newStr.append(line.substring(startIndex));
  
          return newStr.toString();
      }