Log4jSystemConfig extends SystemConfig { public String getSystemName() { String log4jSystem = get(TASK_LOG4J_SYSTEM, null); if (log4jSystem == null) { throw new ConfigException("Missing " + TASK_LOG4J_SYSTEM + " configuration. Can't figure out the system name to use."); } return log4jSystem; } Log4jSystemConfig(Config config); boolean getLocationEnabled(); String getSystemName(); String getJobName(); String getJobId(); String getSerdeClass(String name); String getStreamSerdeName(String systemName, String streamName);  }
@Test public void testGetLog4jSystemName() { Map<String, String> map = new HashMap<String, String>(); map.put("task.log4j.system", "log4j-system"); map.put("systems.system1.samza.factory", "1"); Log4jSystemConfig log4jSystemConfig = new Log4jSystemConfig(new MapConfig(map)); assertEquals("log4j-system", log4jSystemConfig.getSystemName()); map.remove("task.log4j.system"); log4jSystemConfig = new Log4jSystemConfig(new MapConfig(map)); exception.expect(ConfigException.class); log4jSystemConfig.getSystemName(); }