title: Extend Log4j2 Tests
body: <p>I have a wrapper for log4j2 Logger class - e.g.</p>
  <pre><code>import org.apache.logging.log4j.core.Logger;
         
  public class MyLogger extends Logger {
      protected MyLogger(LoggerContext context, String name, MessageFactory messageFactory) {
          super(context, name, messageFactory);
      }
  
      ....
      
  }
  </code></pre>
  <p>I am trying to extend the <a href="https://github.com/apache/logging-log4j2/blob/master/log4j-core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java" rel="nofollow noreferrer">LoggerTest</a> class to verify <code>MyLogger</code> functionality (so I can run the contained test and add new ones). I've tried something like the following:</p>
  <pre><code>@SpringBootTest
  @LoggerContextSource(
      value = &quot;log4j-test2.xml&quot;,
      reconfigure = ReconfigurationPolicy.AFTER_EACH
  )
  public class MyLoggerTest extends LoggerTest {
      public MyLoggerTest(LoggerContext context, ListAppender app, ListAppender host, ListAppender noThrown) {
          super(context, app, host, noThrown);
      }
  }
  </code></pre>
  <p><code>org.junit.jupiter.api.extension.ParameterResolutionException: No ParameterResolver registered for parameter [org.apache.logging.log4j.test.appender.ListAppender arg1] in constructor....</code></p>
  <p>I tried creating a local implementation of <code>@LoggerContextSource</code> and the property resolver/extensions classes it references (<code>@Extensions({@ExtendWith({LoggerContextResolver.class}), @ExtendWith({ConfigurationResolver.class}), @ExtendWith({AppenderResolver.class})})</code>) and referencing those instead
  e.g</p>
  <pre><code>@MyLoggerContextSource(
      value = &quot;log4j-test2.xml&quot;,
      reconfigure = ReconfigurationPolicy.AFTER_EACH
  )
  </code></pre>
  <pre><code>...
  @Extensions({
     @ExtendWith({MyLoggerContextResolver.class}), 
     @ExtendWith({MyConfigurationResolver.class}), 
     @ExtendWith({MyAppenderResolver.class})
  })
  public @interface MyLoggerContextSource {
  ...
  }
  </code></pre>
  <p>but get <code>Duplicate ParameterResolver...</code> error for <code>LoggerContextResolver</code> and <code>MyLoggerContextResolver</code></p>
  <p>Is there anyway I can extend the log4j2 tests?</p>