### Question:
LoggerInitializationListener implements ServletContextListener { @Override public void contextInitialized(ServletContextEvent event) { servletContext = event.getServletContext(); FileInfo fileInfo = log4jConfigLocation(); String previousLog4jInitOverrideValue = System.setProperty(LOG4J_INIT_OVERRIDE_PROPERTY, "true"); if (!loadLog4jConfigurationFromExternalFile(fileInfo)) { loadEmbeddedLog4jConfiguration(); } if (previousLog4jInitOverrideValue == null) { System.clearProperty(LOG4J_INIT_OVERRIDE_PROPERTY); } else { System.setProperty(LOG4J_INIT_OVERRIDE_PROPERTY, previousLog4jInitOverrideValue); } }  @Override void contextInitialized(ServletContextEvent event); @Override void contextDestroyed(ServletContextEvent event);  }### Answer:
@Test public void shouldLeftUnchangedLog4jOverrideProperty() throws Exception { String log4jInitOverrideProperty = "log4j.defaultInitOverride"; System.setProperty(log4jInitOverrideProperty, "salt"); sut.contextInitialized(servletContextEvent); assertEquals("salt", System.getProperty(log4jInitOverrideProperty)); System.clearProperty(log4jInitOverrideProperty); }