public String doLayout(ILoggingEvent event) {
        if (!isStarted()) {
            return CoreConstants.EMPTY_STRING;
        }
        return writeLoopOnConverters(event);
    }
@Test
    public void mdcWithDefaultValue() throws ScanException {
        String pattern = "%msg %mdc{foo1} %mdc{bar:-[null]}";
        pl.setPattern(OptionHelper.substVars(pattern, loggerContext));
        pl.start();

        String key = "foo1";

        logbackMDCAdapter.put(key, key);
        try {
            String val = pl.doLayout(getEventObject());
            assertEquals("Some message foo1 [null]", val);
        } finally {
            logbackMDCAdapter.remove(key);
        }
    }