### Question:
LoggingService { public static void logWarning(String moduleName, String msg) { if (Configuration.debugging || logger == null) { System.out.println(String.format("%s %s : %s (%s)", Thread.currentThread().getName(), moduleName, msg, new Date(System.currentTimeMillis()))); } else { logger.logp(Level.WARNING, Thread.currentThread().getName(), moduleName, msg); } } private  LoggingService(); static void logInfo(String moduleName, String msg); static void logWarning(String moduleName, String msg); static void logDebug(String moduleName, String msg); static void logError(String moduleName, String msg, Throwable e); static void setupLogger(); static void setupMicroserviceLogger(String microserviceUuid, long logSize); static boolean microserviceLogInfo(String microserviceUuid, String msg); static boolean microserviceLogWarning(String microserviceUuid, String msg); static void instanceConfigUpdated();  }### Answer:
@Test public void testLogWarning() { try { LoggingService.setupLogger(); LoggingService.logWarning(MODULE_NAME, message); Mockito.verify(logger).logp(Level.WARNING, Thread.currentThread().getName(), MODULE_NAME, message); } catch (Exception e) { fail("This should not happen"); } }