MDC { public static Object get(final String key) { return ThreadContext.get(key); } private  MDC(); @SuppressWarnings({ "rawtypes", "unchecked" }) static Hashtable getContext(); static Object get(final String key); static void put(final String key, final Object value); static void remove(final String key); static void clear();  }
@Test public void getExistingValue() { when(provider.get("pi")).thenReturn("3.14"); assertThat(MDC.get("pi")).isEqualTo("3.14"); }
@Test public void getMissingValue() { assertThat(MDC.get("pi")).isNull(); }