### Question:
CypherBasedMigration implements Migration { List<String> getStatements() { List<String> availableStatements = this.statements; if (availableStatements == null) { synchronized (this) { availableStatements = this.statements; if (availableStatements == null) { this.statements = readStatements(); availableStatements = this.statements; } } } return availableStatements; } CypherBasedMigration(URL url); @Override MigrationVersion getVersion(); @Override String getDescription(); @Override String getSource(); @Override Optional<String> getChecksum(); @Override void apply(MigrationContext context); @Override String toString();  }### Answer:
@Test void shouldBeAbleToReadFromJar() { URL resource = CypherBasedMigrationTest.class.getResource("/some/changeset/V0002__create_new_data.cypher"); CypherBasedMigration migration = new CypherBasedMigration(resource); List<String> statements = migration.getStatements(); assertThat(statements).containsExactly("CREATE (n:FixedData) RETURN n", "MATCH (n) RETURN count(n) AS foobar"); }
@Test void shouldHandleMultilineStatements() { URL resource = CypherBasedMigrationTest.class .getResource("/my/awesome/migrations/moreStuff/V007__BondTheNameIsBond.cypher"); CypherBasedMigration migration = new CypherBasedMigration(resource); List<String> statements = migration.getStatements(); assertThat(statements).hasSize(2); }