Project flyway/flyway in file ...ore.dbsupport.oracle.OracleSqlScriptSmallTest.java (2010-07-20)
@@ -19,7 +19,10 @@ package com.googlecode.flyway.core.dbsupport.oracle;
 import com.googlecode.flyway.core.runtime.SqlStatement;
 import org.junit.Test;
 import org.springframework.core.io.ClassPathResource;
+import org.springframework.util.FileCopyUtils;
 
+import java.io.InputStreamReader;
+import java.nio.charset.Charset;
 import java.util.HashMap;
 import java.util.List;
 
@@ -30,9 +33,10 @@ import static org.junit.Assert.assertEquals;
  */
 public class OracleSqlScriptSmallTest {
     @Test
-    public void testSqlStatements() {
-        OracleSqlScript sqlScript =
-                new OracleSqlScript(new ClassPathResource("migration/oracle/sql/V1.sql"), new HashMap<String, String>());
+    public void testSqlStatements() throws Exception {
+        String source = FileCopyUtils.copyToString(new InputStreamReader(new ClassPathResource("migration/oracle/sql/V1.sql").getInputStream(), Charset.forName("UTF-8")));
+
+        OracleSqlScript sqlScript = new OracleSqlScript(source, new HashMap<String, String>());
         List<SqlStatement> sqlStatements = sqlScript.getSqlStatements();
         assertEquals(3, sqlStatements.size());
         assertEquals(18, sqlStatements.get(0).getLineNumber());