docs: private String addAndEncode(String originalValue, String newType,
        String newValue, boolean encode) {
      if (newValue == null) {
        return originalValue;
      } else {
        String finalNewValue;
        if (encode) {
          if (newType == null) {
            finalNewValue = new String(
                enc.encode(newValue.getBytes(StandardCharsets.UTF_8)),
                StandardCharsets.UTF_8);
          } else {
            finalNewValue = new String(
                enc.encode(newType.getBytes(StandardCharsets.UTF_8)),
                StandardCharsets.UTF_8)
                + ":"
                + new String(
                    enc.encode(newValue.getBytes(StandardCharsets.UTF_8)),
                    StandardCharsets.UTF_8);
          }
        } else {
          finalNewValue = newValue;
        }
        if (originalValue == null || originalValue.isEmpty()) {
          return finalNewValue;
        } else {
          return originalValue + (encode ? " " : "") + finalNewValue;
        }
      }
    }