public void addDataFormatEnvVariables(Map<String, String> env, Properties properties, boolean custom) {
        Set<String> toRemove = new HashSet<>();
        env.forEach((k, v) -> {
            if (custom) {
                toRemove.add(k);
                String ck = "camel.dataformat." + k.substring(17).toLowerCase(Locale.US).replace('_', '-');
                ck = ck.replaceFirst("-", ".");
                properties.put(ck, v);
            } else {
                Optional<String> e
                        = dataformatEnvNames.stream().filter(k::startsWith).findFirst();
                if (e.isPresent()) {
                    toRemove.add(k);
                    String cname = "camel.dataformat." + e.get().substring(17).toLowerCase(Locale.US).replace('_', '-');
                    String option = k.substring(cname.length() + 1).toLowerCase(Locale.US).replace('_', '-');
                    properties.put(cname + "." + option, v);
                }
            }
        });
        toRemove.forEach(env::remove);
    }
@Test
    public void testAddDataFormatEnvVariables() {
        Map<String, String> env = MainHelper.filterEnvVariables(new String[] { "CAMEL_DATAFORMAT_" });
        env.put("CAMEL_DATAFORMAT_BASE64_LINE_LENGTH", "64");
        env.put("CAMEL_DATAFORMAT_JACKSONXML_PRETTYPRINT", "true");
        Properties prop = new OrderedProperties();
        helper.addDataFormatEnvVariables(env, prop, false);

        Assertions.assertEquals(0, env.size());
        Assertions.assertEquals(2, prop.size());
        Assertions.assertEquals("64", prop.getProperty("camel.dataformat.base64.line-length"));
        Assertions.assertEquals("true", prop.getProperty("camel.dataformat.jacksonxml.prettyprint"));
    }