### Question:
SQLFileChange extends AbstractSQLChange { @Override public void setSql(String sql) { if (getChangeLogParameters() != null) { sql = getChangeLogParameters().expandExpressions(sql); } super.setSql(sql); } SQLFileChange(); String getPath(); void setPath(String fileName); String getEncoding(); void setEncoding(String encoding); Boolean isRelativeToChangelogFile(); void setRelativeToChangelogFile(Boolean relativeToChangelogFile); @Override void init(); @Override ValidationErrors validate(Database database); @Override Warnings warn(Database database); @Override CheckSum generateCheckSum(); String getConfirmationMessage(); @Override void setSql(String sql);  }### Answer:
@Test public void multilineComment2() { String original = "--\r\n"+ "-- This is a comment\r\n" + "UPDATE tablename SET column = 1;\r\n" + "GO"; SQLFileChange change = new SQLFileChange(); change.setSql(original); change.setSplitStatements(true); change.setStripComments(true); SqlStatement[] out = change.generateStatements(new MockDatabase()); assertEquals(2, out.length); assertEquals("UPDATE tablename SET column = 1", out[0].toString()); }
@Test public void testStatementsWithSemicolons() { AbstractSQLChange change2 = new SQLFileChange(); String insertWithSemicolon = "insert into table ( col ) values (' value with; semicolon ');"; change2.setSql(insertWithSemicolon); Database database = new MockDatabase(); SqlStatement[] statements = change2.generateStatements(database); assertEquals("Unexpected amount of statements returned",1, statements.length); String insertWithoutTrailingSemicolon = insertWithSemicolon.substring(0, insertWithSemicolon.length() - 1); assertEquals("unexpected SQL statement returned", insertWithoutTrailingSemicolon, statements[0].toString()); }
@Test public void replacementOfProperties() throws Exception { SQLFileChange change = new SQLFileChange(); ChangeLogParameters changeLogParameters = new ChangeLogParameters(); changeLogParameters.set("table.prefix", "prfx"); changeLogParameters.set("some.other.prop", "nofx"); change.setChangeLogParameters(changeLogParameters); String fakeSql = "create ${table.prefix}_customer (${some.other.prop} INTEGER NOT NULL, PRIMARY KEY (${some.other.prop}));"; change.setSql(fakeSql); String expected = "create prfx_customer (nofx INTEGER NOT NULL, PRIMARY KEY (nofx));"; assertEquals(expected, change.getSql()); }