### Question:
DropTableIfExistsImpl extends BaseFinishedStatement implements DropTableIfExists { @Override public void prependTo(@NotNull final RawSqlBuilder builder) { builder.prepend(mTableName); if (mDatabaseName != null) { builder.prepend('.').prepend(mDatabaseName); } builder.prepend("TABLE IF EXISTS "); } DropTableIfExistsImpl(@Nullable final String databaseName, @NotNull final String tableName, @NotNull final SqlPart previous); @Override void prependTo(@NotNull final RawSqlBuilder builder); @Nullable @Override SqlPart previous();  }### Answer:
@Test public void prependTo_withOnlyTableName_prependsProperSql() { DropTableIfExistsImpl dropTable = new DropTableIfExistsImpl(null, "table", mock(SqlPart.class)); RawSqlBuilder builder = new RawSqlBuilderImpl(); dropTable.prependTo(builder); assertThat(builder.toString(), is("TABLE IF EXISTS table")); }
@Test public void prependTo_withDatabaseAndTableName_prependsProperSql() { DropTableIfExistsImpl dropTable = new DropTableIfExistsImpl("database", "table", mock(SqlPart.class)); RawSqlBuilder builder = new RawSqlBuilderImpl(); dropTable.prependTo(builder); assertThat(builder.toString(), is("TABLE IF EXISTS database.table")); }