### Question:
Logger { public static void logError(String tag, String message) { if (LOG) { Log.e(tag, message); } }  static void logVerbose(String tag, String message); static void logDebug(String tag, String message); static void logError(String tag, String message); static void logInfo(String tag, String message); static void logWarning(String tag, String message);  }### Answer:
@Test public void logErrorDebugOn() { Whitebox.setInternalState(Logger.class, "LOG", true); Logger.logError(logTag, logMessage); PowerMockito.verifyStatic(Log.class); Log.e(logTag, logMessage); }
@Test public void logErrorDebugOff() { Whitebox.setInternalState(Logger.class, "LOG", false); Logger.logError(logTag, logMessage); PowerMockito.verifyZeroInteractions(Log.class); }