SeverityLevelIntegerToken implements Token { @Override public void render(final LogEntry logEntry, final StringBuilder builder) { builder.append(getReverseOfOrdinalAsLevelValue(logEntry)); } SeverityLevelIntegerToken(); @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 renderTrace() { SeverityLevelIntegerToken token = new SeverityLevelIntegerToken(); assertThat(render(token, Level.TRACE)).isEqualTo("5"); }
@Test public void renderDebug() { SeverityLevelIntegerToken token = new SeverityLevelIntegerToken(); assertThat(render(token, Level.DEBUG)).isEqualTo("4"); }
@Test public void renderInfo() { SeverityLevelIntegerToken token = new SeverityLevelIntegerToken(); assertThat(render(token, Level.INFO)).isEqualTo("3"); }
@Test public void renderWarning() { SeverityLevelIntegerToken token = new SeverityLevelIntegerToken(); assertThat(render(token, Level.WARN)).isEqualTo("2"); }
@Test public void renderError() { SeverityLevelIntegerToken token = new SeverityLevelIntegerToken(); assertThat(render(token, Level.ERROR)).isEqualTo("1"); }