TransactionImpl extends BaseFinishedStatement implements Transaction { @Nullable @Override public SqlPart previous() { return mSqlPart; } TransactionImpl(final SqlPart sqlPart); @Override void prependTo(@NotNull final RawSqlBuilder builder); @Nullable @Override SqlPart previous();  }
@Test public void previous_returnsProperItem() { SqlPart sqlPart = mock(SqlPart.class); TransactionImpl transaction = new TransactionImpl(sqlPart); SqlPart result = transaction.previous(); assertThat(result, is(sqlPart)); }