AddColumnImpl extends BaseFinishedStatement implements AddColumn { @Nullable @Override public SqlPart previous() { return mPrevious; } AddColumnImpl(@NotNull final Column column, @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); AddColumnImpl addColumn = new AddColumnImpl(mock(Column.class), sqlPart); SqlPart result = addColumn.previous(); assertThat(result, is(sqlPart)); }