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