CatalogAndSchema referenceCatalogAndSchema = buildCatalogAndSchema(referenceDatabase);
CompareControl.SchemaComparison[] schemaComparisons = {
new CompareControl.SchemaComparison(referenceCatalogAndSchema, targetCatalogAndSchema)
};
SnapshotGeneratorFactory snapshotGeneratorFactory = SnapshotGeneratorFactory.getInstance();
DatabaseSnapshot referenceSnapshot;
try {
referenceSnapshot = snapshotGeneratorFactory.createSnapshot(referenceDatabase.getDefaultSchema(),
referenceDatabase, new SnapshotControl(referenceDatabase, diffTypes));
} catch (LiquibaseException e) {
throw new BuildException("Unable to create a DatabaseSnapshot.", e);
}