static InitWriterConfig fromMap(Map<String, String> map) {
        Map<String, String> envMap = new HashMap<>(map);
        envMap.keySet().retainAll(InitWriterConfig.keyNames());

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

        return new InitWriterConfig(generatedMap);
    }
@Test
    public void testFromMap() {
        InitWriterConfig config = InitWriterConfig.fromMap(ENV_VARS);

        assertThat(config.getNodeName(), is("localhost"));
        assertThat(config.getRackTopologyKey(), is("failure-domain.beta.kubernetes.io/zone"));
        assertThat(config.isExternalAddress(), is(true));
        assertThat(config.getAddressType(), is(nullValue()));
    }