docs: static Map<String, Comparable> prepareProperties(Map<String, Comparable> properties,
                                                       Collection<PropertyDefinition> propertyDefinitions) {
          Map<String, Comparable> mappedProperties = createHashMap(propertyDefinitions.size());
  
          for (PropertyDefinition propertyDefinition : propertyDefinitions) {
              String propertyKey = propertyDefinition.key();
              if (!properties.containsKey(propertyKey)) {
                  if (!propertyDefinition.optional()) {
                      throw new InvalidConfigurationException(
                              String.format("Missing property '%s' on discovery strategy", propertyKey));
                  }
                  continue;
              }
              Comparable value = properties.get(propertyKey);
  
              TypeConverter typeConverter = propertyDefinition.typeConverter();
              Comparable mappedValue = typeConverter.convert(value);
  
              ValueValidator validator = propertyDefinition.validator();
              if (validator != null) {
                  validator.validate(mappedValue);
              }
  
              mappedProperties.put(propertyKey, mappedValue);
          }
  
          verifyNoUnknownProperties(mappedProperties, properties);
  
          return mappedProperties;
      }