### Question:
LogUtil { public static void log(Logger theLogger, Level theLevel, String theMessage, Object... theArgs) { switch (theLevel) { case TRACE: theLogger.trace(theMessage, theArgs); break; case DEBUG: theLogger.debug(theMessage, theArgs); break; case INFO: theLogger.info(theMessage, theArgs); break; case WARN: theLogger.warn(theMessage, theArgs); break; case ERROR: theLogger.error(theMessage, theArgs); break; } }  static void log(Logger theLogger, Level theLevel, String theMessage, Object... theArgs);  }### Answer:
@Test public void testLevels() { Logger log = mock(Logger.class); LogUtil.log(log, Level.TRACE, "HELLO"); LogUtil.log(log, Level.DEBUG, "HELLO"); LogUtil.log(log, Level.INFO, "HELLO"); LogUtil.log(log, Level.WARN, "HELLO"); LogUtil.log(log, Level.ERROR, "HELLO"); verify(log, times(1)).trace(anyString(),any(Object[].class)); verify(log, times(1)).debug(anyString(),any(Object[].class)); verify(log, times(1)).info(anyString(),any(Object[].class)); verify(log, times(1)).warn(anyString(),any(Object[].class)); verify(log, times(1)).error(anyString(),any(Object[].class)); verifyNoMoreInteractions(log); }