MethodNameToken implements Token { @Override public void apply(final LogEntry logEntry, final PreparedStatement statement, final int index) throws SQLException { statement.setString(index, logEntry.getMethodName()); } MethodNameToken(); @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 applyMethodName() throws SQLException { MethodNameToken token = new MethodNameToken(); PreparedStatement statement = mock(PreparedStatement.class); token.apply(createLogEntry("testMethod"), statement, 1); verify(statement).setString(1, "testMethod"); }