JBossContextProvider implements ContextProvider { @Override public void remove(final String key) { MDC.remove(key); } JBossContextProvider(); @Override Map<String, String> getMapping(); @Override String get(final String key); @Override void put(final String key, final Object value); @Override void remove(final String key); @Override void clear();  }
@Test public void remove() { MDC.put("a", 1); MDC.put("b", 2); JBossContextProvider provider = new JBossContextProvider(); provider.remove("a"); assertThat(MDC.getMap()).containsOnly(entry("b", 2)); provider.remove("b"); assertThat(MDC.getMap()).isEmpty(); }