MessageAndExceptionToken implements Token { @Override public Collection<LogEntryValue> getRequiredLogEntryValues() { return EnumSet.of(LogEntryValue.MESSAGE, LogEntryValue.EXCEPTION); } MessageAndExceptionToken(final List<ThrowableFilter> filters); @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 requiredLogEntryValues() { MessageAndExceptionToken token = new MessageAndExceptionToken(Collections.emptyList()); assertThat(token.getRequiredLogEntryValues()).containsOnly(LogEntryValue.MESSAGE, LogEntryValue.EXCEPTION); }