public async Task UpdateFailsIfVersionNumberChanged()
        {
            using var db = new MockServerVersionDbContextUsingMutations(ConnectionString);

            // Set the result of the concurrency check to an empty result set to simulate a version number that has changed.
            var concurrencySql = $"SELECT 1 FROM `SingersWithVersion` {Environment.NewLine}WHERE `SingerId` = @p0 AND `Version` = @p1";

            _fixture.SpannerMock.AddOrUpdateStatementResult(concurrencySql, StatementResult.CreateSingleColumnResultSet(new V1.Type {
                Code = V1.TypeCode.Int64
            }, "COL1"));

            // Attach a singer to the context and try to update it.
            var singer = new SingersWithVersion {
                SingerId = 1L, FirstName = "Pete", LastName = "Allison", Version = 1L
            };

            db.Attach(singer);

            singer.LastName = "Allison - Peterson";
            await Assert.ThrowsAsync <DbUpdateConcurrencyException>(() => db.SaveChangesAsync());

            // Update the concurrency check result to 1 to simulate a resolved version conflict.
            _fixture.SpannerMock.AddOrUpdateStatementResult(concurrencySql, StatementResult.CreateSelect1ResultSet());
            Assert.Equal(1L, await db.SaveChangesAsync());
        }