LimitImpl extends BaseFinishedSelectStatement implements Limit { @Nullable @Override public SqlPart previous() { return mPrevious; } LimitImpl(final long limit, @NotNull final SqlPart previous); @Override void prependTo(@NotNull final RawSqlBuilder builder); @Nullable @Override SqlPart previous();  }
@Test public void previous_returnsProperItem() { SqlPart sqlPart = mock(SqlPart.class); LimitImpl limit = new LimitImpl(5, sqlPart); SqlPart result = limit.previous(); assertThat(result, is(sqlPart)); }