private void runAndWait(Runnable runnable) {
        RecordingExceptionHandler handler = new RecordingExceptionHandler();
        Thread thread = new Thread(runnable);
        thread.setUncaughtExceptionHandler(handler);
        thread.start();
        try {
            thread.join();
        } catch (Throwable t) {
            fail("Unexpected failure in child thread:" + t.getMessage());
        }
        assertFalse(handler.getMessage(), handler.hadException());
    }
Tests for {@link BasicMDCAdapter}

@author Lukasz Cwik
slf4j-api/src/test/java/org/slf4j/helpers/MDCAdapterTestBase.java