aboutsummaryrefslogtreecommitdiff
path: root/slf4j-api/src/test/java/org/slf4j/helpers/BasicMDCAdapterTest.java
blob: f73a6e06872bf4f8e0fb063dadfe8106eef23156 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package org.slf4j.helpers;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;

import org.junit.Test;

public class BasicMDCAdapterTest extends MDCAdapterTestBase {

    @Test
    public void testClearingMDC() {
        mdc.put("testKey", "testValue");
        assertFalse(mdc.getCopyOfContextMap().isEmpty());
        mdc.clear();
        assertNull(mdc.getCopyOfContextMap());
    }
}