EnvironmentConfigRewriter implements ConfigRewriter { @Override public Config rewrite(String name, Config config) { return rewrite(config, System.getenv()); }  @Override Config rewrite(String name, Config config); static final String SAMZA_KEY_PREFIX; static final Logger LOGGER; }
@Test(expected = IllegalArgumentException.class) public void testRewriteFailsOnDowncaseMatch() throws Exception { Map<String, String> config = createMap("foo.Bar", "a"); Map<String, String> env = createMap("SAMZA_FOO_BAR", "b"); rewriter.rewrite(new MapConfig(config), env); }
@Test public void testRewriteOverridesConfig() throws Exception { Map<String, String> config = createMap("foo.bar", "a"); Map<String, String> env = createMap("SAMZA_FOO_BAR", "b"); Config rewritten = rewriter.rewrite(new MapConfig(config), env); assertEquals("b", rewritten.get("foo.bar")); }