StaticLogger { public static void error(Object tag, String message) { if (logger != null) logger.error(tag, message); } private  StaticLogger(); static void debug(Object tag, String message); static void error(Object tag, String message); static void error(Object tag, String message, Throwable th); static void info(Object tag, String message); static void init(Logger logger);  }
@Test public void error() throws Exception { StaticLogger.error(TAG, MESSAGE); verify(logger).error(eq(TAG), eq(MESSAGE)); }
@Test public void errorWithThrowable() throws Exception { Throwable th = new IndexOutOfBoundsException(); StaticLogger.error(TAG, MESSAGE, th); verify(logger).error(eq(TAG), eq(MESSAGE), eq(th)); }