ProcessIdToken implements Token { @Override public void apply(final LogEntry logEntry, final PreparedStatement statement, final int index) throws SQLException { statement.setLong(index, pid); } ProcessIdToken(); @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 apply() throws SQLException { ProcessIdToken token = new ProcessIdToken(); PreparedStatement statement = mock(PreparedStatement.class); token.apply(LogEntryBuilder.empty().create(), statement, 1); verify(statement).setLong(1, RuntimeProvider.getProcessId()); }