001package org.slf4j.reload4j;
002
003import static org.junit.Assert.assertFalse;
004import static org.junit.Assert.assertTrue;
005
006import org.junit.Test;
007import org.slf4j.helpers.MDCAdapterTestBase;
008import org.slf4j.reload4j.Reload4jMDCAdapter;
009import org.slf4j.spi.MDCAdapter;
010
011public class Reload4jMDCAdapterTest extends MDCAdapterTestBase {
012    
013    protected MDCAdapter instantiateMDC() {
014        return new Reload4jMDCAdapter();
015    }
016    
017    
018    @Test
019    public void testClearingMDC() {
020        mdc.put("testKey", "testValue");
021        assertFalse(mdc.getCopyOfContextMap().isEmpty());
022        mdc.clear();
023        assertTrue(mdc.getCopyOfContextMap().isEmpty());
024    }
025
026    
027
028}