### Question:
TaskLogger implements CliLogger { @Override public void info(String pattern, Object... arguments) { this.writeLine("[INFO] " + getContent(pattern, arguments)); } TaskLogger(Path logFile); @Override void enableSendStompMessage(Integer taskId, SimpMessagingTemplate messagingTemplate, String destinationPrefix); @Override void error(Throwable e); @Override void error(String pattern, Object... arguments); @Override void info(String pattern, Object... arguments); @Override void newLine(); @Override void log(String pattern, Object... arguments); @Override void log(String content); @Override void finished(ReleaseResult releaseResult);  }### Answer:
@Test public void info_no_arguments() throws IOException { CliLogger logger = new TaskLogger(logFile); logger.info("Hello Block Lang"); String content = Files.readString(logFile); assertThat(content).isEqualTo("[INFO] Hello Block Lang" + System.lineSeparator()); }
@Test public void info_log_file_not_exist() throws IOException { Path logFile = logFolder.resolve("folder1").resolve("folder2").resolve("a.log"); CliLogger logger = new TaskLogger(logFile); logger.info("Hello Block Lang"); String content = Files.readString(logFile); assertThat(content).isEqualTo("[INFO] Hello Block Lang" + System.lineSeparator()); }
@Test public void info_with_arguments() throws IOException { CliLogger logger = new TaskLogger(logFile); logger.info("Hello {0}", "Block Lang"); String content = Files.readString(logFile); assertThat(content).isEqualTo("[INFO] Hello Block Lang" + System.lineSeparator()); }