LoggerImpl implements Logger { @Override public void setClientId(String clientId) { MDC.put(CLIENTID_KEY, clientId); } LoggerImpl(Class<?> clazz);  LoggerImpl(org.slf4j.Logger logger); @Override void setClientId(String clientId); @Override void info(String message); @Override void warning(String message); @Override void error(String message); @Override void error(String message, Throwable throwable); @Override void entry(String methodName); @Override void entry(String methodName, Object... objects); @Override void entry(Object source, String methodName); @Override void entry(Object source, String methodName, Object... objects); @Override void exit(String methodName); @Override void exit(String methodName, Object result); @Override void exit(Object source, String methodName); @Override void exit(Object source, String methodName, Object result); @Override void data(String methodName); @Override void data(String methodName, Object... objects); @Override void data(Object source, String methodName); @Override void data(Object source, String methodName, Object... objects); @Override void throwing(String methodName, Throwable throwable); @Override void throwing(Object source, String methodName, Throwable throwable); @Override void ffdc(String methodName, FFDCProbeId probeId, Throwable throwable, Object... data); @Override void ffdc(Object source, String methodName, FFDCProbeId probeId, Throwable throwable, Object... data);  }
@Test public void testClientId() { final MockLogger logger = new MockLogger("testClientId"); final Logger testLogger = LoggerFactory.getLogger(logger); testLogger.setClientId("TestClientId"); final String clientId = MDC.get(Logger.CLIENTID_KEY); assertEquals("Expected client id to be set", "TestClientId", clientId); }