Log { public static void format(String format, Object... args) { if (!isDisabled()) { print(String.format(format, args)); } }  static void print(String message); static void print(Object message); static void printLine(String message); static void printLine(); static void printConcat(Object... messages); static void printConcatLine(Object... messages); static void printLine(Object message); static void format(String format, Object... args); static void formatLine(String format, Object... args); static void setOutput(OutputStream _output); static OutputStream getOutput(); static void setDisabled(boolean _disabled); static boolean isDisabled(); static void disable(); static void enable();  }
@Test public void testFormat() throws IOException { Log.format("test %s test", "test"); assertEquals("test test test", OUTPUT.toString()); OUTPUT.reset(); Log.format("%d", 123); assertEquals("123", OUTPUT.toString()); OUTPUT.reset(); Log.format("%d", 123L); assertEquals("123", OUTPUT.toString()); OUTPUT.reset(); Log.format("%.2f", 123.01); assertEquals("123"+dfs.getDecimalSeparator()+"01", OUTPUT.toString()); OUTPUT.reset(); }