PlainTextToken implements Token { @Override public void render(final LogEntry logEntry, final StringBuilder builder) { builder.append(text); } PlainTextToken(final String text); @Override Collection<LogEntryValue> getRequiredLogEntryValues(); @Override void render(final LogEntry logEntry, final StringBuilder builder); @Override void apply(final LogEntry logEntry, final PreparedStatement statement, final int index);  }
@Test public void renderSimpleText() { PlainTextToken token = new PlainTextToken("Hello World!"); assertThat(render(token)).isEqualTo("Hello World!"); }
@Test public void renderWindowsNewLines() { PlainTextToken token = new PlainTextToken("\r\n"); assertThat(render(token)).isEqualTo(NEW_LINE); }
@Test public void renderUnixNewLines() { PlainTextToken token = new PlainTextToken("\n"); assertThat(render(token)).isEqualTo(NEW_LINE); }
@Test public void renderMacNewLines() { PlainTextToken token = new PlainTextToken("\r"); assertThat(render(token)).isEqualTo(NEW_LINE); }