public static String[] extractTraitsFromProperties(Properties properties) {
        if (properties != null && !properties.isEmpty()) {
            Stream<String> propertyTraits = properties.entrySet().stream()
                    .filter(property -> property.getKey().toString().startsWith("camel.jbang.trait"))
                    .map(property -> StringHelper.after(property.getKey().toString(), "camel.jbang.trait.") + "="
                                     + properties.get(property.getKey()).toString());
            return propertyTraits.collect(Collectors.toSet()).toArray(String[]::new);
        }
        return new String[0];
    }
@Test
    public void extractTraitsFromPropertiesTest() {
        Properties properties = new Properties();
        properties.setProperty("camel.jbang.trait.container.port", "8080");
        properties.setProperty("camel.jbang.trait.container.port-name", "custom");
        properties.setProperty("camel.jbang.name", "MyRoute");
        String[] result = TraitHelper.extractTraitsFromProperties(properties);
        Assertions.assertNotNull(result);
        Assertions.assertEquals(2, result.length);
        Assertions.assertTrue(Arrays.asList(result).contains("container.port-name=custom"));

        String[] resultEmpty = TraitHelper.extractTraitsFromProperties(new Properties());
        Assertions.assertNotNull(resultEmpty);

        String[] resultNull = TraitHelper.extractTraitsFromProperties(null);
        Assertions.assertNotNull(resultNull);
    }