public void addLanguageEnvVariables(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.language." + k.substring(15).toLowerCase(Locale.US).replace('_', '-');
                ck = ck.replaceFirst("-", ".");
                properties.put(ck, v);
            } else {
                Optional<String> e
                        = languageEnvNames.stream().filter(k::startsWith).findFirst();
                if (e.isPresent()) {
                    toRemove.add(k);
                    String cname = "camel.language." + e.get().substring(15).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 testAddLanguageEnvVariables() {
        Map<String, String> env = MainHelper.filterEnvVariables(new String[] { "CAMEL_LANGUAGE_" });
        env.put("CAMEL_LANGUAGE_JOOR_PRE_COMPILE", "false");
        Properties prop = new OrderedProperties();
        helper.addLanguageEnvVariables(env, prop, false);

        Assertions.assertEquals(0, env.size());
        Assertions.assertEquals(1, prop.size());
        Assertions.assertEquals("false", prop.getProperty("camel.language.joor.pre-compile"));
    }