public static UserOperatorConfig buildFromMap(Map<String, String> map) {
        Map<String, String> envMap = new HashMap<>(map);
        envMap.keySet().retainAll(UserOperatorConfig.keyNames());

        Map<String, Object> generatedMap = ConfigParameter.define(envMap, CONFIG_VALUES);

        return new UserOperatorConfig(generatedMap);
    }
@Test
    public void testFeatureGatesParsing()    {
        // We test that the configuration is really parsing the feature gates environment variable. We test it on
        // non-existing feature gate instead of a real one so that we do not have to change it when the FGs are promoted
        Map<String, String> envVars = new HashMap<>(UserOperatorConfigTest.ENV_VARS);
        envVars.put(UserOperatorConfig.FEATURE_GATES.key(), "-NonExistingGate");

        InvalidConfigurationException e = assertThrows(InvalidConfigurationException.class, () -> UserOperatorConfig.buildFromMap(envVars));
        assertThat(e.getMessage(), is("Unknown feature gate NonExistingGate found in the configuration"));
    }