public async Task WhenLinuxInstanceCreated_ThenReportContainsInstanceAndLicenseInfoFromItsDisk(
            [LinuxInstance] InstanceRequest testInstance,
            [Credential(Roles = new[] {
            PredefinedRole.ComputeViewer,
            PredefinedRole.LogsViewer
        })] CredentialRequest credential)
        {
            await testInstance.AwaitReady();

            var instanceRef = await testInstance.GetInstanceAsync();

            var startDate = DateTime.UtcNow.AddDays(-1);
            var builder   = new AuditLogReportBuilder(
                new AuditLogAdapter(await credential.GetCredentialAsync()),
                new ComputeEngineAdapter(await credential.GetCredentialAsync()),
                new[] { TestProject.ProjectId },
                startDate);
            var report = await builder.BuildAsync(CancellationToken.None);

            var instance = report.History.Instances.First(i => i.Reference == instanceRef);

            Assert.IsTrue(report.IsInstanceAnnotatedAs(
                              instance,
                              OperatingSystemTypes.Linux,
                              LicenseTypes.Unknown));
        }
        public async Task WhenWindowsInstanceCreated_ThenReportContainsInstanceAndLicenseInfoFromItsDisk(
            [WindowsInstance] InstanceRequest testInstance)
        {
            await testInstance.AwaitReady();

            var instanceRef = await testInstance.GetInstanceAsync();

            var startDate = DateTime.UtcNow.AddDays(-1);
            var builder   = new AuditLogReportBuilder(
                new AuditLogAdapter(Defaults.GetCredential()),
                new ComputeEngineAdapter(Defaults.GetCredential()),
                new[] { Defaults.ProjectId },
                startDate);
            var report = await builder.BuildAsync(CancellationToken.None);

            var instance = report.History.Instances.First(i => i.Reference == instanceRef);

            Assert.IsTrue(report.IsInstanceAnnotatedAs(
                              instance,
                              OperatingSystemTypes.Windows,
                              LicenseTypes.Spla));
        }