@Test
public void testWithDevelopmentEnvironment() throws JoranException {

  LoggerContext context = new LoggerContext();
  URL resource = getClass().getResource("/logback-with-select-appender.xml");
  JoranConfigurator configurator = new JoranConfigurator();
  context.putProperty("APPENDER_KEY", "development");
  configurator.setContext(context);
  configurator.doConfigure(resource);
  ch.qos.logback.classic.Logger logger = context.getLogger(Logger.ROOT_LOGGER_NAME);
  SelectAppender selectAppender = (SelectAppender) logger.getAppender("SELECT");
  CompositeAppender<ILoggingEvent> development =
      (CompositeAppender<ILoggingEvent>) selectAppender.getAppender("test");
  ListAppender<ILoggingEvent> listAppender =
      (ListAppender<ILoggingEvent>) development.getAppender("test-list");
  logger.info("hello world");
  assertThat(listAppender.list.size()).isEqualTo(0);
}