### Question:
LoggerInitializationListener implements ServletContextListener { @Override public void contextInitialized(ServletContextEvent event) { servletContext = event.getServletContext(); FileInfo fileInfo = getConfigurationFileNameFromJNDI(); if (fileInfo == null) { fileInfo = getConfigurationFileNameFromDatasourcePropertiesFile(); } if (fileInfo == null) { fileInfo = getConfigurationFileNameFromSystemProperties(); } 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 shouldReturnLog4jOverrideProperty() throws Exception { System.setProperty("log4j.defaultInitOverride", "salt"); sut.contextInitialized(servletContextEvent); assertEquals("salt", System.getProperty("log4j.defaultInitOverride")); }