Logger { public static void logWarning(String tag, String message) { if (LOG) { Log.w(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);  }
@Test public void logWarningDebugOn() { Whitebox.setInternalState(Logger.class, "LOG", true); Logger.logWarning(logTag, logMessage); PowerMockito.verifyStatic(Log.class); Log.w(logTag, logMessage); }
@Test public void logWarningDebugOff() { Whitebox.setInternalState(Logger.class, "LOG", false); Logger.logWarning(logTag, logMessage); PowerMockito.verifyZeroInteractions(Log.class); }