public Map<String, String> getEnv() {
        Map<String, String> env = new HashMap<>();
        env.putAll(cleanEnvironment(this.env));
        env.putAll(additionalVariables);
        return Collections.unmodifiableMap(env);
    }
@Test
    void testFiltering() {
        final Environment env = new Environment(Map.of("USER", "test", "JAVA_HOME", "/path/to/jre"));
        Assertions.assertThat(env.getEnv())
                 .doesNotContainKey("JAVA_HOME")
                .containsKey("USER");
    }