ImmediateImpl extends BaseSqlPart implements Immediate { @NotNull @Override public Transaction transaction() { return new TransactionImpl(this); } ImmediateImpl(@NotNull final SqlPart sqlPart); @NotNull @Override Transaction transaction(); @Override void prependTo(@NotNull final RawSqlBuilder builder); @Nullable @Override SqlPart previous();  }
@Test public void transaction_returnsNotNull() { ImmediateImpl immediate = new ImmediateImpl(mock(SqlPart.class)); Transaction result = immediate.transaction(); assertThat(result, is(notNullValue())); }