public async Task GetNotExpiredImageScansReturnsTheLatestScan()
        {
            // Arrange
            await using var context = JosekiTestsDb.CreateUniqueContext();

            var parser = new ConfigurationParser("config.sample.yaml");
            var db     = new MssqlJosekiDatabase(context, parser);

            var tag   = Guid.NewGuid().ToString();
            var scans = new[]
            {
                new ImageScanResultEntity {
                    ImageTag = tag, Date = DateTime.UtcNow.AddHours(-5), Status = joseki.db.entities.ImageScanStatus.Failed
                },
                new ImageScanResultEntity {
                    ImageTag = tag, Date = DateTime.UtcNow, Status = joseki.db.entities.ImageScanStatus.Queued
                },
                new ImageScanResultEntity {
                    ImageTag = tag, Date = DateTime.UtcNow.AddHours(-3), Status = joseki.db.entities.ImageScanStatus.Succeeded
                },
            };

            context.ImageScanResult.AddRange(scans);
            await context.SaveChangesAsync();

            // Act & Assert
            var notExpiredScans = await db.GetNotExpiredImageScans(new[] { tag });

            notExpiredScans.Should().HaveCount(1);
            notExpiredScans.First().Status.Should().Be(ImageScanStatus.Queued);
        }
        public async Task GetNotExpiredImageScansReturnsEmptyArrayIfNoActualScanResult()
        {
            // Arrange
            await using var context = JosekiTestsDb.CreateUniqueContext();

            context.ImageScanResult.Add(new ImageScanResultEntity {
                ImageTag = Guid.NewGuid().ToString(), Date = DateTime.UtcNow.AddHours(-1)
            });
            await context.SaveChangesAsync();

            var parser = new ConfigurationParser("config.sample.yaml");
            var db     = new MssqlJosekiDatabase(context, parser);

            // Act & Assert
            var notExpiredScans = await db.GetNotExpiredImageScans(new[] { Guid.NewGuid().ToString() });

            notExpiredScans.Should().BeEmpty();
        }