AnalyzeImpl extends BaseFinishedStatement implements Analyze { @Override public void prependTo(@NotNull final RawSqlBuilder builder) { if (mTableOrIndexName != null) { builder.prepend(mTableOrIndexName); builder.prepend(mDatabaseName == null ? ' ' : '.'); } if (mDatabaseName != null) { builder.prepend(mDatabaseName).prepend(' '); } builder.prepend("ANALYZE"); }  @Override AnalyzeImpl database(@NotNull final String databaseName); @Override AnalyzeImpl tableOrIndex(@NotNull final String tableOrIndexName); @Override AnalyzeImpl databaseAndTableOrIndex(@NotNull final String databaseName, @NotNull final String tableOrIndexName); @Override void prependTo(@NotNull final RawSqlBuilder builder); @Nullable @Override SqlPart previous();  }
@Test public void appendEmptyAnalyze_appendsProperSql() { AnalyzeImpl analyze = new AnalyzeImpl(); RawSqlBuilder builder = new RawSqlBuilderImpl(); analyze.prependTo(builder); assertThat(builder.toString(), is("ANALYZE")); }