verify("catching WARN M-CATCHING[ EXCEPTION ] E java.lang.Error: This is the last test.");
}
@SuppressWarnings("unchecked")
private void verify(final String expected) {
final LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
final Map<String, Appender<?>> list = ctx.getConfiguration().getAppenders();
final Appender<?> listApp = list.get("List");
assertNotNull("Missing Appender", listApp);
assertTrue("Not a ListAppender", listApp instanceof ListAppender);
final List<String> events = ((ListAppender<String>) listApp).getMessages();
try