DummyMessagePrinter implements MessagePrinter { @Override public void flush() { }  static MessagePrinter getInstance(); @Override void print(String format, Object... args); @Override void println(); @Override void println(String format, Object... args); @Override void flush();  }
@Test public void testFlush() throws IOException { final MessagePrinter instance = DummyMessagePrinter.getInstance(); instance.flush(); }