extension Tester {
    public func testInsertAndFind() throws {
        Atom.database = database
        try Atom.prepare(database)
        defer {
            try! Atom.revert(database)
        }

        let hydrogen = Atom(id: "asdf", name: "Hydrogen", protons: 1, weight: 1.007)

        guard hydrogen.exists == false else {
            throw Error.failed("Exists should be false since not yet saved.")
        }
        try hydrogen.save()
        
        guard hydrogen.id?.string == "asdf" else {
            throw Error.failed("Saved ID not equal to set id.")
        }
        
        guard hydrogen.exists == true else {
            throw Error.failed("Exists should be true since just saved.")
        }

        guard let id = hydrogen.id else {
            throw Error.failed("ID not set on Atom after save.")
        }

        guard let found = try Atom.find(id) else {
            throw Error.failed("Could not find Atom by id.")
        }

        guard hydrogen.id == found.id else {
            throw Error.failed("ID retrieved different than what was saved.")
        }
        
        guard hydrogen.name == found.name else {
            throw Error.failed("Name retrieved different than what was saved.")
        }
        
        guard hydrogen.protons == found.protons else {
            throw Error.failed("Protons retrieved different than what was saved.")
        }
        
        guard hydrogen.weight == found.weight else {
            throw Error.failed("Weight retrieved different than what was saved.")
        }
        
    }
}

extension Tester {
    public func testInsertAndFind() throws {
        Atom.database = database
        try Atom.prepare(database)
        defer {
            try! Atom.revert(database)
        }

        let uuid = UUID()
        let hydrogen = Atom(id: Identifier(uuid.uuidString), name: "Hydrogen", protons: 1, weight: 1.007)

        guard hydrogen.exists == false else {
            throw Error.failed("Exists should be false since not yet saved.")
        }
        try hydrogen.save()
        
        guard hydrogen.id?.string?.lowercased() == uuid.uuidString.lowercased() else {
            throw Error.failed("Saved ID not equal to set id.")
        }
        
        guard hydrogen.exists == true else {
            throw Error.failed("Exists should be true since just saved.")
        }

        guard let id = hydrogen.id else {
            throw Error.failed("ID not set on Atom after save.")
        }

        guard let found = try Atom.find(id) else {
            throw Error.failed("Could not find Atom by id.")
        }

        guard hydrogen.id == found.id else {
            throw Error.failed("ID retrieved different than what was saved.")
        }
        
        guard hydrogen.name == found.name else {
            throw Error.failed("Name retrieved different than what was saved.")
        }
        
        guard hydrogen.protons == found.protons else {
            throw Error.failed("Protons retrieved different than what was saved.")
        }
        
        guard hydrogen.weight == found.weight else {
            throw Error.failed("Weight retrieved different than what was saved.")
        }
    }
}

Use valid UUID for insert-and-fix
Use valid UUID for insert-and-fix

Postgres – unlike MySQL – actually validates the UUIDs sent as values, so the tests of postgresql-driver were silently broken by the Fluent 2.0.1 release. This commit fixes the test by using a valid UUID instead of just `"asdf"`.

I noticed that PG returns UUID fields as all lowercase, so I changed the comparison to be case insensitive. (It shouldn't be a problem as we're talking about the string representation of an otherwise fixed binary entity and the hex numbers still match.)