// Use for Coyote.
    /*********************************/
    public async Task GetAndUpdateAtTheSameTime()
    {
        _context.Certificates.AddRange(CertificateBuilder.GetDefaultValues());
        _context.SaveChanges();

        _context.ChangeTracker.Clear();

        var certificate = await _context.Certificates.AsNoTracking().FirstOrDefaultAsync();

        // This code throws an DbUpdateConcurrencyException,
        // so we add a check (try-catch) to the "Edit" methods of the controllers.
        var deleteResult = _repository.DeleteAsync(certificate);
        var updateResult = _repository.UpdateAsync(certificate);

        await Task.WhenAll(deleteResult, updateResult);
    }
    public CertificateRepositoryTests()
    {
        var dbOptions = new DbContextOptionsBuilder <ApplicationContext>()
                        .UseInMemoryDatabase(databaseName: "CertificateTestDB")
                        .Options;

        _context = new ApplicationContext(dbOptions);

        _repository = new Infrastructure.Repositories.CertificateRepository(_context);

        _context.Certificates.AddRange(CertificateBuilder.GetDefaultValues());
        _context.SaveChanges();

        var certificate = _context.Certificates.AsNoTracking().FirstOrDefault();

        _context.Links.AddRange(LinkBuilder.GetDefaultValues(certificate.Id));
        _context.SaveChanges();
    }