### Question:
JdbcTemplateSqlExecutor implements SqlExecutor { public String[] removeCommentsAndSemicolons( Schema schema, String[] sql ) { String[] newsql = new String[sql.length]; for ( int i = 0; i < sql.length; i++ ) { newsql[i] = removeCommentsAndSemicolons( schema, sql[i] ); } return newsql; }  void setConnectionModel( ConnectionModel connectionModel ); String[] removeCommentsAndSemicolons( Schema schema, String[] sql ); String removeCommentsAndSemicolons( Schema schema, String sql ); void execute( final String[] sql, final ExecutorCallback callback );  }### Answer:
@Test public void testSqlCommentRemoval() { SchemaStub schemaStub = new SchemaStub(); schemaStub.setDialect(new DialectStub()); StringBuilder sb = new StringBuilder(); schemaStub.getDialect().comment(sb, " my comment"); sb.append("SELECT * FROM TBL;"); String sqlresults = exec.removeCommentsAndSemicolons(schemaStub, sb.toString()); assertEquals(sqlresults, "SELECT * FROM TBL"); String str[] = new String[] {sb.toString()}; String results[] = exec.removeCommentsAndSemicolons(schemaStub, str); assertEquals(results.length, 1); assertEquals(results[0], "SELECT * FROM TBL"); }