RegexFilter filter = RegexFilter.createFilter(".* test .*", null, null, null);
filter.start();
assertTrue(filter.isStarted());
assertTrue(filter.filter(null, Level.DEBUG, null, "This is a test message", (Throwable)null) == Filter.Result.NEUTRAL);
assertTrue(filter.filter(null, Level.ERROR, null, "This is not a test", (Throwable)null) == Filter.Result.DENY);
LogEvent event = new Log4jLogEvent(null, null, null, Level.DEBUG, new SimpleMessage("Another test message"), null);
assertTrue(filter.filter(event) == Filter.Result.NEUTRAL);
event = new Log4jLogEvent(null, null, null, Level.ERROR, new SimpleMessage("test"), null);
assertTrue(filter.filter(event) == Filter.Result.DENY);
filter = RegexFilter.createFilter("* test *", null, null, null);
assertNull(filter);
}