@Test void shouldLogFormattedMessage() { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); PrintStream printStream = new PrintStream(outputStream); TaskListener taskListener = createTaskListener(printStream); LogHandler logHandler = new LogHandler(taskListener, LOG_HANDLER_NAME); logHandler.log(LOGGER_MESSAGE); assertThat(outputStream.toString()) .isEqualTo(String.format("[%s] %s%n", LOG_HANDLER_NAME, LOGGER_MESSAGE)); }
public void log(final Report report) { logErrorMessages(report); logInfoMessages(report); }
LogHandler { public void log(final Report report) { logErrorMessages(report); logInfoMessages(report); } }
LogHandler { public void log(final Report report) { logErrorMessages(report); logInfoMessages(report); } LogHandler(final TaskListener listener, final String name);  LogHandler(final TaskListener listener, final String name, final Report report); private  LogHandler(final TaskListener listener, final String name, final int infoPosition,
            final int errorPosition); }
LogHandler { public void log(final Report report) { logErrorMessages(report); logInfoMessages(report); } LogHandler(final TaskListener listener, final String name);  LogHandler(final TaskListener listener, final String name, final Report report); private  LogHandler(final TaskListener listener, final String name, final int infoPosition,
            final int errorPosition); void log(final Report report); @FormatMethod void log(final String format, final Object... args); }
LogHandler { public void log(final Report report) { logErrorMessages(report); logInfoMessages(report); } LogHandler(final TaskListener listener, final String name);  LogHandler(final TaskListener listener, final String name, final Report report); private  LogHandler(final TaskListener listener, final String name, final int infoPosition,
            final int errorPosition); void log(final Report report); @FormatMethod void log(final String format, final Object... args);  }