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.replace("-", ""))) {
                properties.put(propertyKey, properties.remove(propertyKey.replace("-", "")));
            }

            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;
    }
@Test
    public void unsatisfiedOptionalProperty() {
        // given
        Map<String, Comparable> properties = emptyMap();
        Collection<PropertyDefinition> propertyDefinitions = singletonList(
                new SimplePropertyDefinition(PROPERTY_KEY_1, true, STRING));

        // when
        Map<String, Comparable> result = prepareProperties(properties, propertyDefinitions);

        // then
        assertTrue(result.isEmpty());
    }