### Question:
CypherBasedMigration implements Migration { @Override public Optional<String> getChecksum() { String availableChecksum = this.checksum; if (availableChecksum == null) { synchronized (this) { availableChecksum = this.checksum; if (availableChecksum == null) { this.checksum = computeChecksum(); availableChecksum = this.checksum; } } } return Optional.of(availableChecksum); } 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 shouldComputeCheckSum() { URL resource = CypherBasedMigrationTest.class.getResource("/some/changeset/V0001__delete_old_data.cypher"); CypherBasedMigration migration = new CypherBasedMigration(resource); assertThat(migration.getChecksum()).hasValue("1100083332"); }