@Test
public void testPatternWithConfiguration() throws Exception {
final Configuration config = new DefaultConfiguration();
final MessagePatternConverter converter = MessagePatternConverter.newInstance(config, null);
Message msg = new SimpleMessage("Hello!");
LogEvent event = new Log4jLogEvent("MyLogger", null, null, Level.DEBUG, msg, null);
StringBuilder sb = new StringBuilder();
converter.format(event, sb);
assertTrue("Unexpected result", "Hello!".equals(sb.toString()));
event = new Log4jLogEvent("MyLogger", null, null, Level.DEBUG, null, null);