public void testFromClassPath() throws Exception {
final MockServletContext context = new MockServletContext();
context.setInitParameter(Log4jContextListener.LOG4J_CONTEXT_NAME, "Test1");
context.setInitParameter(Log4jContextListener.LOG4J_CONFIG, "log4j2-config.xml");
final Log4jContextListener listener = new Log4jContextListener();
final ServletContextEvent event = new ServletContextEvent(context);
listener.contextInitialized(event);
LogManager.getLogger("org.apache.test.TestConfigurator");
final LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
Configuration config = ctx.getConfiguration();
assertNotNull("No configuration", config);