// with the packages element pointing to our custom plugin
ctx = Configurator.initialize("Test1", "customplugin/log4j2-741.xml");
config = ctx.getConfiguration();
listAppender = (ListAppender) config.getAppender("List");
Logger logger = LogManager.getLogger(PluginManagerPackagesTest.class);
logger.info("this message is ignored");
List<String> messages = listAppender.getMessages();
assertEquals(messages.toString(), 1, messages.size());
assertEquals("abc123XYZ", messages.get(0));
}