### Question:
JdbcHighWaterMarkVisitor extends AbstractFunction1<T, T> implements Serializable { @Nullable @Override public T apply(@Nullable final T value) { accumulable.$plus$eq(toLong.apply(value)); return value; } JdbcHighWaterMarkVisitor(@Nonnull final Accumulable<JdbcHighWaterMark, Long> accumulable, @Nonnull final Function1<T, Long> toLong); @Nullable @Override T apply(@Nullable final T value);  }### Answer:
@Test @SuppressWarnings("unchecked") public void apply() { final Accumulable<JdbcHighWaterMark, Long> accumulable = Mockito.mock(Accumulable.class); final JdbcHighWaterMarkVisitor<Long> visitor = new JdbcHighWaterMarkVisitor<>(accumulable, new IdentityFunction<Long>()); visitor.apply(1L); Mockito.verify(accumulable).$plus$eq(1L); }