JBossContextProvider implements ContextProvider { @Override public void put(final String key, final Object value) { MDC.put(key, value); } 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 addValue() { new JBossContextProvider().put("pi", "3.14"); assertThat(MDC.getMap()).containsOnly(entry("pi", "3.14")); }
@Test public void overrideValue() { MDC.put("test", "a"); new JBossContextProvider().put("test", "b"); assertThat(MDC.getMap()).containsOnly(entry("test", "b")); }