TinylogMdcAdapter implements MDCAdapter { @Override public String get(final String key) { return ThreadContext.get(key); } TinylogMdcAdapter(); @Override void put(final String key, final String value); @Override String get(final String key); @Override void remove(final String key); @Override void clear(); @Override Map<String, String> getCopyOfContextMap(); @Override void setContextMap(final Map<String, String> contextMap);  }
@Test public void get() { when(provider.get("test")).thenReturn("42"); assertThat(new TinylogMdcAdapter().get("test")).isEqualTo("42"); }