### Question:
CommonsLogger extends AbstractInternalLogger { public void warn(String msg) { logger.warn(msg); } CommonsLogger(Log logger, String loggerName); void debug(String msg); void debug(String msg, Throwable cause); void error(String msg); void error(String msg, Throwable cause); void info(String msg); void info(String msg, Throwable cause); boolean isDebugEnabled(); boolean isErrorEnabled(); boolean isInfoEnabled(); boolean isWarnEnabled(); void warn(String msg); void warn(String msg, Throwable cause); @Override String toString();  }### Answer:
@Test public void testWarn() { Log mock = createStrictMock(Log.class); mock.warn("a"); replay(mock); InternalLogger logger = new CommonsLogger(mock, "foo"); logger.warn("a"); verify(mock); }
@Test public void testWarnWithException() { Log mock = createStrictMock(Log.class); mock.warn("a", e); replay(mock); InternalLogger logger = new CommonsLogger(mock, "foo"); logger.warn("a", e); verify(mock); }