@@ -0,0 +1,1316 @@
+package org.apache.logging.log4j.junit;%0A%0Aimport org.apache.logging.log4j.core.LoggerContext;%0Aimport org.apache.logging.log4j.core.config.Configurator;%0Aimport org.junit.rules.TestRule;%0Aimport org.junit.runner.Description;%0Aimport org.junit.runners.model.Statement;%0A%0A/**%0A * JUnit %7B@link TestRule%7D for constructing a new LoggerContext using a specified configuration file.%0A */%0Apublic class InitialLoggerContext implements TestRule %7B%0A%0A    private final String configLocation;%0A%0A    private LoggerContext context;%0A%0A    public InitialLoggerContext(String configLocation) %7B%0A        this.configLocation = configLocation;%0A    %7D%0A%0A    @Override%0A    public Statement apply(final Statement base, final Description description) %7B%0A        return new Statement() %7B%0A            @Override%0A            public void evaluate() throws Throwable %7B%0A                context = Configurator.initialize(%0A                        description.getDisplayName(),%0A                        description.getTestClass().getClassLoader(),%0A                        configLocation%0A                );%0A                try %7B%0A                    base.evaluate();%0A                %7D finally %7B%0A                    Configurator.shutdown(context);%0A                %7D%0A            %7D%0A        %7D;%0A    %7D%0A%0A    public LoggerContext getContext() %7B%0A        return context;%0A    %7D%0A%7D%0A

Add InitialLoggerContext JUnit test rule.