SelectFromImpl extends BaseFinishedSelectStatement implements SelectFrom { @Override public void prependTo(@NotNull final RawSqlBuilder builder) { builder.prepend(mTableName).prepend("FROM "); } SelectFromImpl(@NotNull final String tableName, @NotNull final SqlPart previous); @NotNull @Override SelectWhere where(@NotNull final String expression, @NotNull final Object... arguments); @NotNull @Override GroupBy groupBy(@NotNull final String expression); @NotNull @Override OrderBy orderBy(@NotNull final String... terms); @NotNull @Override Limit limit(final long limit); @Override void prependTo(@NotNull final RawSqlBuilder builder); @Nullable @Override SqlPart previous();  }
@Test public void prependTo_prependsProperSql() { SelectFromImpl from = new SelectFromImpl("my_table", mock(SqlPart.class)); RawSqlBuilder builder = new RawSqlBuilderImpl(); from.prependTo(builder); assertThat(builder.toString(), is("FROM my_table")); }