TinylogLoggerProvider implements LoggerProvider { @Override public Object putMdc(final String key, final Object value) { ThreadContext.put(key, value); return null; } TinylogLoggerProvider(); @Override Logger getLogger(final String name); @Override void clearMdc(); @Override Object putMdc(final String key, final Object value); @Override Object getMdc(final String key); @Override void removeMdc(final String key); @SuppressWarnings({ "unchecked", "rawtypes" }) @Override Map<String, Object> getMdcMap(); @Override void clearNdc(); @Override String getNdc(); @Override int getNdcDepth(); @Override String popNdc(); @Override String peekNdc(); @Override void pushNdc(final String message); @Override void setNdcMaxDepth(final int maxDepth);  }
@Test public void putMdc() { logging.putMdc("test", "42"); verify(context).put("test", "42"); }