DeferredImpl extends BaseSqlPart implements Deferred { @Override public void prependTo(@NotNull final RawSqlBuilder builder) { builder.prepend("DEFERRED"); } DeferredImpl(@NotNull final SqlPart sqlPart); @NotNull @Override Transaction transaction(); @Override void prependTo(@NotNull final RawSqlBuilder builder); @Nullable @Override SqlPart previous();  }
@Test public void prependTo_prependsProperSql() { DeferredImpl deferred = new DeferredImpl(mock(SqlPart.class)); RawSqlBuilder builder = new RawSqlBuilderImpl(); deferred.prependTo(builder); assertThat(builder.toString(), is("DEFERRED")); }