---
policy: /ce/unit-test/is-before-today
logic: /ce/unit-test/is-before-today/unit-test.logic.yaml
executionTime: 2025-04-24T23:47:51.286127129Z
rows:
  - id: 2024-01-05T00:00:00Z
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 199
      actual: 199
    conditionText:
      expected: "unitTest(2024-01-05T00:00:00Z): '2024-01-05T00:00:00Z'.beforeToday()"
      actual: "unitTest(2024-01-05T00:00:00Z): '2024-01-05T00:00:00Z'.beforeToday()"
    runtimeError: {}
  - id: 2024-01-05T23:59:59Z
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 299
      actual: 299
    conditionText:
      expected: "unitTest(2024-01-05T23:59:59Z): '2024-01-05T23:59:59Z'.beforeToday()"
      actual: "unitTest(2024-01-05T23:59:59Z): '2024-01-05T23:59:59Z'.beforeToday()"
    runtimeError: {}
  - id: 2024-01-06T00:00:00Z
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 399
      actual: 399
    conditionText:
      expected: "unitTest(2024-01-06T00:00:00Z): '2024-01-06T00:00:00Z'.beforeToday()"
      actual: "unitTest(2024-01-06T00:00:00Z): '2024-01-06T00:00:00Z'.beforeToday()"
    runtimeError: {}
  - id: 2024-01-06T23:59:59Z
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 499
      actual: 499
    conditionText:
      expected: "unitTest(2024-01-06T23:59:59Z): '2024-01-06T23:59:59Z'.beforeToday()"
      actual: "unitTest(2024-01-06T23:59:59Z): '2024-01-06T23:59:59Z'.beforeToday()"
    runtimeError: {}
  - id: 2024-01-07T00:00:00Z
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 599
      actual: 599
    conditionText:
      expected: "unitTest(2024-01-07T00:00:00Z): '2024-01-07T00:00:00Z'.beforeToday()"
      actual: "unitTest(2024-01-07T00:00:00Z): '2024-01-07T00:00:00Z'.beforeToday()"
    runtimeError: {}
  - id: 2024-01-07T23:59:59Z
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 699
      actual: 699
    conditionText:
      expected: "unitTest(2024-01-07T23:59:59Z): '2024-01-07T23:59:59Z'.beforeToday()"
      actual: "unitTest(2024-01-07T23:59:59Z): '2024-01-07T23:59:59Z'.beforeToday()"
    runtimeError: {}
  - id: 2024-01-08T00:00:00Z
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 799
      actual: 799
    conditionText:
      expected: "unitTest(2024-01-08T00:00:00Z): '2024-01-08T00:00:00Z'.beforeToday()"
      actual: "unitTest(2024-01-08T00:00:00Z): '2024-01-08T00:00:00Z'.beforeToday()"
    runtimeError: {}
  - id: 2024-01-08T23:59:59Z
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 899
      actual: 899
    conditionText:
      expected: "unitTest(2024-01-08T23:59:59Z): '2024-01-08T23:59:59Z'.beforeToday()"
      actual: "unitTest(2024-01-08T23:59:59Z): '2024-01-08T23:59:59Z'.beforeToday()"
    runtimeError: {}
  - id: 2024-01-09T00:00:00Z
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 999
      actual: 999
    conditionText:
      expected: "unitTest(2024-01-09T00:00:00Z): '2024-01-09T00:00:00Z'.beforeToday()"
      actual: "unitTest(2024-01-09T00:00:00Z): '2024-01-09T00:00:00Z'.beforeToday()"
    runtimeError: {}
  - id: 2024-01-09T23:59:59Z
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 1099
      actual: 1099
    conditionText:
      expected: "unitTest(2024-01-09T23:59:59Z): '2024-01-09T23:59:59Z'.beforeToday()"
      actual: "unitTest(2024-01-09T23:59:59Z): '2024-01-09T23:59:59Z'.beforeToday()"
    runtimeError: {}
  - id: 2024-01-10T00:00:00Z
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 1199
      actual: 1199
    conditionText:
      expected: "unitTest(2024-01-10T00:00:00Z): not('2024-01-10T00:00:00Z'.beforeToday())"
      actual: "unitTest(2024-01-10T00:00:00Z): not('2024-01-10T00:00:00Z'.beforeToday())"
    runtimeError: {}
  - id: now
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 1299
      actual: 1299
    conditionText:
      expected: "unitTest(now): '2024-01-10T18:00:00Z' == '2024-01-10T18:00:00Z'"
      actual: "unitTest(now): '2024-01-10T18:00:00Z' == '2024-01-10T18:00:00Z'"
    runtimeError: {}
  - id: 2024-01-10T23:59:59Z
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 1399
      actual: 1399
    conditionText:
      expected: "unitTest(2024-01-10T23:59:59Z): not('2024-01-10T23:59:59Z'.beforeToday())"
      actual: "unitTest(2024-01-10T23:59:59Z): not('2024-01-10T23:59:59Z'.beforeToday())"
    runtimeError: {}
  - id: 2024-01-11T00:00:00Z
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 1499
      actual: 1499
    conditionText:
      expected: "unitTest(2024-01-11T00:00:00Z): not('2024-01-11T00:00:00Z'.beforeToday())"
      actual: "unitTest(2024-01-11T00:00:00Z): not('2024-01-11T00:00:00Z'.beforeToday())"
    runtimeError: {}
  - id: 2024-01-11T23:59:59Z
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 1599
      actual: 1599
    conditionText:
      expected: "unitTest(2024-01-11T23:59:59Z): not('2024-01-11T23:59:59Z'.beforeToday())"
      actual: "unitTest(2024-01-11T23:59:59Z): not('2024-01-11T23:59:59Z'.beforeToday())"
    runtimeError: {}
  - id: 2024-01-12T00:00:00Z
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 1699
      actual: 1699
    conditionText:
      expected: "unitTest(2024-01-12T00:00:00Z): not('2024-01-12T00:00:00Z'.beforeToday())"
      actual: "unitTest(2024-01-12T00:00:00Z): not('2024-01-12T00:00:00Z'.beforeToday())"
    runtimeError: {}
  - id: 2024-01-12T23:59:59Z
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 1799
      actual: 1799
    conditionText:
      expected: "unitTest(2024-01-12T23:59:59Z): not('2024-01-12T23:59:59Z'.beforeToday())"
      actual: "unitTest(2024-01-12T23:59:59Z): not('2024-01-12T23:59:59Z'.beforeToday())"
    runtimeError: {}
  - id: 2024-01-13T00:00:00Z
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 1899
      actual: 1899
    conditionText:
      expected: "unitTest(2024-01-13T00:00:00Z): not('2024-01-13T00:00:00Z'.beforeToday())"
      actual: "unitTest(2024-01-13T00:00:00Z): not('2024-01-13T00:00:00Z'.beforeToday())"
    runtimeError: {}
  - id: 2024-01-13T23:59:59Z
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 1999
      actual: 1999
    conditionText:
      expected: "unitTest(2024-01-13T23:59:59Z): not('2024-01-13T23:59:59Z'.beforeToday())"
      actual: "unitTest(2024-01-13T23:59:59Z): not('2024-01-13T23:59:59Z'.beforeToday())"
    runtimeError: {}
  - id: 2024-01-14T00:00:00Z
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 2099
      actual: 2099
    conditionText:
      expected: "unitTest(2024-01-14T00:00:00Z): not('2024-01-14T00:00:00Z'.beforeToday())"
      actual: "unitTest(2024-01-14T00:00:00Z): not('2024-01-14T00:00:00Z'.beforeToday())"
    runtimeError: {}
  - id: 2024-01-14T23:59:59Z
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 2199
      actual: 2199
    conditionText:
      expected: "unitTest(2024-01-14T23:59:59Z): not('2024-01-14T23:59:59Z'.beforeToday())"
      actual: "unitTest(2024-01-14T23:59:59Z): not('2024-01-14T23:59:59Z'.beforeToday())"
    runtimeError: {}
  - id: 2024-01-15T00:00:00Z
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 2299
      actual: 2299
    conditionText:
      expected: "unitTest(2024-01-15T00:00:00Z): not('2024-01-15T00:00:00Z'.beforeToday())"
      actual: "unitTest(2024-01-15T00:00:00Z): not('2024-01-15T00:00:00Z'.beforeToday())"
    runtimeError: {}
  - id: 2024-01-15T23:59:59Z
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 2399
      actual: 2399
    conditionText:
      expected: "unitTest(2024-01-15T23:59:59Z): not('2024-01-15T23:59:59Z'.beforeToday())"
      actual: "unitTest(2024-01-15T23:59:59Z): not('2024-01-15T23:59:59Z'.beforeToday())"
    runtimeError: {}
  - id: Null-1
    match: true
    status:
      expected: COMPLIANT
      actual: COMPLIANT
    conditionIndex:
      expected: 2499
      actual: 2499
    conditionText:
      expected: "unitTest(Null-1): not(null.beforeToday())"
      actual: "unitTest(Null-1): not(null.beforeToday())"
    runtimeError: {}
usedFiles:
  - path: /ce/unit-test/is-before-today/policy.yaml
    md5Hash: 870919B8A6AC68742BA01246B2B68AFB
    content: |-
      ---
      names:
        full: "IS_BEFORE_TODAY Unit Tests"
        contextual: IS_BEFORE_TODAY
      description: ""
  - path: /ce/unit-test/is-before-today/unit-test.logic.yaml
    md5Hash: 414B07E79D8D0E6C5CBF792900A7278E
    content: |-
      ---
      inputType: CA10__CaAwsInstance__c
      testData:
        - file: test-data.json
      conditions:
        - status: COMPLIANT
          currentStateMessage: "2024-01-05T00:00:00Z"
          check:
            UNIT_TEST:
              id: "2024-01-05T00:00:00Z"
              arg:
                IS_BEFORE_TODAY:
                  arg:
                    DATE_TIME: "2024-01-05T00:00:00Z"
        - status: COMPLIANT
          currentStateMessage: "2024-01-05T23:59:59Z"
          check:
            UNIT_TEST:
              id: "2024-01-05T23:59:59Z"
              arg:
                IS_BEFORE_TODAY:
                  arg:
                    DATE_TIME: "2024-01-05T23:59:59Z"
        - status: COMPLIANT
          currentStateMessage: "2024-01-06T00:00:00Z"
          check:
            UNIT_TEST:
              id: "2024-01-06T00:00:00Z"
              arg:
                IS_BEFORE_TODAY:
                  arg:
                    DATE_TIME: "2024-01-06T00:00:00Z"
        - status: COMPLIANT
          currentStateMessage: "2024-01-06T23:59:59Z"
          check:
            UNIT_TEST:
              id: "2024-01-06T23:59:59Z"
              arg:
                IS_BEFORE_TODAY:
                  arg:
                    DATE_TIME: "2024-01-06T23:59:59Z"
        - status: COMPLIANT
          currentStateMessage: "2024-01-07T00:00:00Z"
          check:
            UNIT_TEST:
              id: "2024-01-07T00:00:00Z"
              arg:
                IS_BEFORE_TODAY:
                  arg:
                    DATE_TIME: "2024-01-07T00:00:00Z"
        - status: COMPLIANT
          currentStateMessage: "2024-01-07T23:59:59Z"
          check:
            UNIT_TEST:
              id: "2024-01-07T23:59:59Z"
              arg:
                IS_BEFORE_TODAY:
                  arg:
                    DATE_TIME: "2024-01-07T23:59:59Z"
        - status: COMPLIANT
          currentStateMessage: "2024-01-08T00:00:00Z"
          check:
            UNIT_TEST:
              id: "2024-01-08T00:00:00Z"
              arg:
                IS_BEFORE_TODAY:
                  arg:
                    DATE_TIME: "2024-01-08T00:00:00Z"
        - status: COMPLIANT
          currentStateMessage: "2024-01-08T23:59:59Z"
          check:
            UNIT_TEST:
              id: "2024-01-08T23:59:59Z"
              arg:
                IS_BEFORE_TODAY:
                  arg:
                    DATE_TIME: "2024-01-08T23:59:59Z"
        - status: COMPLIANT
          currentStateMessage: "2024-01-09T00:00:00Z"
          check:
            UNIT_TEST:
              id: "2024-01-09T00:00:00Z"
              arg:
                IS_BEFORE_TODAY:
                  arg:
                    DATE_TIME: "2024-01-09T00:00:00Z"
        - status: COMPLIANT
          currentStateMessage: "2024-01-09T23:59:59Z"
          check:
            UNIT_TEST:
              id: "2024-01-09T23:59:59Z"
              arg:
                IS_BEFORE_TODAY:
                  arg:
                    DATE_TIME: "2024-01-09T23:59:59Z"
        - status: COMPLIANT
          currentStateMessage: "2024-01-10T00:00:00Z"
          check:
            UNIT_TEST:
              id: "2024-01-10T00:00:00Z"
              arg:
                NOT:
                  arg:
                    IS_BEFORE_TODAY:
                      arg:
                        DATE_TIME: "2024-01-10T00:00:00Z"
        - status: COMPLIANT
          currentStateMessage: "now"
          check:
            UNIT_TEST:
              id: "now"
              arg:
                IS_EQUAL:
                  left:
                    DATE_TIME: "2024-01-10T18:00:00Z"
                  right:
                    DATE_TIME: "2024-01-10T18:00:00Z"
        - status: COMPLIANT
          currentStateMessage: "2024-01-10T23:59:59Z"
          check:
            UNIT_TEST:
              id: "2024-01-10T23:59:59Z"
              arg:
                NOT:
                  arg:
                    IS_BEFORE_TODAY:
                      arg:
                        DATE_TIME: "2024-01-10T23:59:59Z"
        - status: COMPLIANT
          currentStateMessage: "2024-01-11T00:00:00Z"
          check:
            UNIT_TEST:
              id: "2024-01-11T00:00:00Z"
              arg:
                NOT:
                  arg:
                    IS_BEFORE_TODAY:
                      arg:
                        DATE_TIME: "2024-01-11T00:00:00Z"
        - status: COMPLIANT
          currentStateMessage: "2024-01-11T23:59:59Z"
          check:
            UNIT_TEST:
              id: "2024-01-11T23:59:59Z"
              arg:
                NOT:
                  arg:
                    IS_BEFORE_TODAY:
                      arg:
                        DATE_TIME: "2024-01-11T23:59:59Z"
        - status: COMPLIANT
          currentStateMessage: "2024-01-12T00:00:00Z"
          check:
            UNIT_TEST:
              id: "2024-01-12T00:00:00Z"
              arg:
                NOT:
                  arg:
                    IS_BEFORE_TODAY:
                      arg:
                        DATE_TIME: "2024-01-12T00:00:00Z"
        - status: COMPLIANT
          currentStateMessage: "2024-01-12T23:59:59Z"
          check:
            UNIT_TEST:
              id: "2024-01-12T23:59:59Z"
              arg:
                NOT:
                  arg:
                    IS_BEFORE_TODAY:
                      arg:
                        DATE_TIME: "2024-01-12T23:59:59Z"
        - status: COMPLIANT
          currentStateMessage: "2024-01-13T00:00:00Z"
          check:
            UNIT_TEST:
              id: "2024-01-13T00:00:00Z"
              arg:
                NOT:
                  arg:
                    IS_BEFORE_TODAY:
                      arg:
                        DATE_TIME: "2024-01-13T00:00:00Z"
        - status: COMPLIANT
          currentStateMessage: "2024-01-13T23:59:59Z"
          check:
            UNIT_TEST:
              id: "2024-01-13T23:59:59Z"
              arg:
                NOT:
                  arg:
                    IS_BEFORE_TODAY:
                      arg:
                        DATE_TIME: "2024-01-13T23:59:59Z"
        - status: COMPLIANT
          currentStateMessage: "2024-01-14T00:00:00Z"
          check:
            UNIT_TEST:
              id: "2024-01-14T00:00:00Z"
              arg:
                NOT:
                  arg:
                    IS_BEFORE_TODAY:
                      arg:
                        DATE_TIME: "2024-01-14T00:00:00Z"
        - status: COMPLIANT
          currentStateMessage: "2024-01-14T23:59:59Z"
          check:
            UNIT_TEST:
              id: "2024-01-14T23:59:59Z"
              arg:
                NOT:
                  arg:
                    IS_BEFORE_TODAY:
                      arg:
                        DATE_TIME: "2024-01-14T23:59:59Z"
        - status: COMPLIANT
          currentStateMessage: "2024-01-15T00:00:00Z"
          check:
            UNIT_TEST:
              id: "2024-01-15T00:00:00Z"
              arg:
                NOT:
                  arg:
                    IS_BEFORE_TODAY:
                      arg:
                        DATE_TIME: "2024-01-15T00:00:00Z"
        - status: COMPLIANT
          currentStateMessage: "2024-01-15T23:59:59Z"
          check:
            UNIT_TEST:
              id: "2024-01-15T23:59:59Z"
              arg:
                NOT:
                  arg:
                    IS_BEFORE_TODAY:
                      arg:
                        DATE_TIME: "2024-01-15T23:59:59Z"
        - status: COMPLIANT
          currentStateMessage: "Null-1"
          check:
            UNIT_TEST:
              id: "Null-1"
              arg:
                NOT:
                  arg:
                    IS_BEFORE_TODAY:
                      arg:
                        UNIT_TEST_NULL:
                          returnType: DATE_TIME
      otherwise:
        status: INCOMPLIANT
        currentStateMessage: Test Failed
        remediationMessage: Developer Fix Required
  - path: /ce/unit-test/is-before-today/test-data.json
    md5Hash: D24CBE556575DFA2E5C5839989036133
    content: |-
      [
        {
          "expectedResult": {
            "status": "COMPLIANT",
            "conditionIndex": "199",
            "conditionText": "unitTest(2024-01-05T00:00:00Z): '2024-01-05T00:00:00Z'.beforeToday()",
            "runtimeError": null
          },
          "context": {
            "snapshotTime": "2024-01-10T18:00:00Z"
          },
          "Id": "2024-01-05T00:00:00Z",
          "Name": "2024-01-05T00:00:00Z",
          "CA10__disappearanceTime__c": null
        },
        {
          "expectedResult": {
            "status": "COMPLIANT",
            "conditionIndex": "299",
            "conditionText": "unitTest(2024-01-05T23:59:59Z): '2024-01-05T23:59:59Z'.beforeToday()",
            "runtimeError": null
          },
          "context": {
            "snapshotTime": "2024-01-10T18:00:00Z"
          },
          "Id": "2024-01-05T23:59:59Z",
          "Name": "2024-01-05T23:59:59Z",
          "CA10__disappearanceTime__c": null
        },
        {
          "expectedResult": {
            "status": "COMPLIANT",
            "conditionIndex": "399",
            "conditionText": "unitTest(2024-01-06T00:00:00Z): '2024-01-06T00:00:00Z'.beforeToday()",
            "runtimeError": null
          },
          "context": {
            "snapshotTime": "2024-01-10T18:00:00Z"
          },
          "Id": "2024-01-06T00:00:00Z",
          "Name": "2024-01-06T00:00:00Z",
          "CA10__disappearanceTime__c": null
        },
        {
          "expectedResult": {
            "status": "COMPLIANT",
            "conditionIndex": "499",
            "conditionText": "unitTest(2024-01-06T23:59:59Z): '2024-01-06T23:59:59Z'.beforeToday()",
            "runtimeError": null
          },
          "context": {
            "snapshotTime": "2024-01-10T18:00:00Z"
          },
          "Id": "2024-01-06T23:59:59Z",
          "Name": "2024-01-06T23:59:59Z",
          "CA10__disappearanceTime__c": null
        },
        {
          "expectedResult": {
            "status": "COMPLIANT",
            "conditionIndex": "599",
            "conditionText": "unitTest(2024-01-07T00:00:00Z): '2024-01-07T00:00:00Z'.beforeToday()",
            "runtimeError": null
          },
          "context": {
            "snapshotTime": "2024-01-10T18:00:00Z"
          },
          "Id": "2024-01-07T00:00:00Z",
          "Name": "2024-01-07T00:00:00Z",
          "CA10__disappearanceTime__c": null
        },
        {
          "expectedResult": {
            "status": "COMPLIANT",
            "conditionIndex": "699",
            "conditionText": "unitTest(2024-01-07T23:59:59Z): '2024-01-07T23:59:59Z'.beforeToday()",
            "runtimeError": null
          },
          "context": {
            "snapshotTime": "2024-01-10T18:00:00Z"
          },
          "Id": "2024-01-07T23:59:59Z",
          "Name": "2024-01-07T23:59:59Z",
          "CA10__disappearanceTime__c": null
        },
        {
          "expectedResult": {
            "status": "COMPLIANT",
            "conditionIndex": "799",
            "conditionText": "unitTest(2024-01-08T00:00:00Z): '2024-01-08T00:00:00Z'.beforeToday()",
            "runtimeError": null
          },
          "context": {
            "snapshotTime": "2024-01-10T18:00:00Z"
          },
          "Id": "2024-01-08T00:00:00Z",
          "Name": "2024-01-08T00:00:00Z",
          "CA10__disappearanceTime__c": null
        },
        {
          "expectedResult": {
            "status": "COMPLIANT",
            "conditionIndex": "899",
            "conditionText": "unitTest(2024-01-08T23:59:59Z): '2024-01-08T23:59:59Z'.beforeToday()",
            "runtimeError": null
          },
          "context": {
            "snapshotTime": "2024-01-10T18:00:00Z"
          },
          "Id": "2024-01-08T23:59:59Z",
          "Name": "2024-01-08T23:59:59Z",
          "CA10__disappearanceTime__c": null
        },
        {
          "expectedResult": {
            "status": "COMPLIANT",
            "conditionIndex": "999",
            "conditionText": "unitTest(2024-01-09T00:00:00Z): '2024-01-09T00:00:00Z'.beforeToday()",
            "runtimeError": null
          },
          "context": {
            "snapshotTime": "2024-01-10T18:00:00Z"
          },
          "Id": "2024-01-09T00:00:00Z",
          "Name": "2024-01-09T00:00:00Z",
          "CA10__disappearanceTime__c": null
        },
        {
          "expectedResult": {
            "status": "COMPLIANT",
            "conditionIndex": "1099",
            "conditionText": "unitTest(2024-01-09T23:59:59Z): '2024-01-09T23:59:59Z'.beforeToday()",
            "runtimeError": null
          },
          "context": {
            "snapshotTime": "2024-01-10T18:00:00Z"
          },
          "Id": "2024-01-09T23:59:59Z",
          "Name": "2024-01-09T23:59:59Z",
          "CA10__disappearanceTime__c": null
        },
        {
          "expectedResult": {
            "status": "COMPLIANT",
            "conditionIndex": "1199",
            "conditionText": "unitTest(2024-01-10T00:00:00Z): not('2024-01-10T00:00:00Z'.beforeToday())",
            "runtimeError": null
          },
          "context": {
            "snapshotTime": "2024-01-10T18:00:00Z"
          },
          "Id": "2024-01-10T00:00:00Z",
          "Name": "2024-01-10T00:00:00Z",
          "CA10__disappearanceTime__c": null
        },
        {
          "expectedResult": {
            "status": "COMPLIANT",
            "conditionIndex": "1299",
            "conditionText": "unitTest(now): '2024-01-10T18:00:00Z' == '2024-01-10T18:00:00Z'",
            "runtimeError": null
          },
          "context": {
            "snapshotTime": "2024-01-10T18:00:00Z"
          },
          "Id": "now",
          "Name": "now",
          "CA10__disappearanceTime__c": null
        },
        {
          "expectedResult": {
            "status": "COMPLIANT",
            "conditionIndex": "1399",
            "conditionText": "unitTest(2024-01-10T23:59:59Z): not('2024-01-10T23:59:59Z'.beforeToday())",
            "runtimeError": null
          },
          "context": {
            "snapshotTime": "2024-01-10T18:00:00Z"
          },
          "Id": "2024-01-10T23:59:59Z",
          "Name": "2024-01-10T23:59:59Z",
          "CA10__disappearanceTime__c": null
        },
        {
          "expectedResult": {
            "status": "COMPLIANT",
            "conditionIndex": "1499",
            "conditionText": "unitTest(2024-01-11T00:00:00Z): not('2024-01-11T00:00:00Z'.beforeToday())",
            "runtimeError": null
          },
          "context": {
            "snapshotTime": "2024-01-10T18:00:00Z"
          },
          "Id": "2024-01-11T00:00:00Z",
          "Name": "2024-01-11T00:00:00Z",
          "CA10__disappearanceTime__c": null
        },
        {
          "expectedResult": {
            "status": "COMPLIANT",
            "conditionIndex": "1599",
            "conditionText": "unitTest(2024-01-11T23:59:59Z): not('2024-01-11T23:59:59Z'.beforeToday())",
            "runtimeError": null
          },
          "context": {
            "snapshotTime": "2024-01-10T18:00:00Z"
          },
          "Id": "2024-01-11T23:59:59Z",
          "Name": "2024-01-11T23:59:59Z",
          "CA10__disappearanceTime__c": null
        },
        {
          "expectedResult": {
            "status": "COMPLIANT",
            "conditionIndex": "1699",
            "conditionText": "unitTest(2024-01-12T00:00:00Z): not('2024-01-12T00:00:00Z'.beforeToday())",
            "runtimeError": null
          },
          "context": {
            "snapshotTime": "2024-01-10T18:00:00Z"
          },
          "Id": "2024-01-12T00:00:00Z",
          "Name": "2024-01-12T00:00:00Z",
          "CA10__disappearanceTime__c": null
        },
        {
          "expectedResult": {
            "status": "COMPLIANT",
            "conditionIndex": "1799",
            "conditionText": "unitTest(2024-01-12T23:59:59Z): not('2024-01-12T23:59:59Z'.beforeToday())",
            "runtimeError": null
          },
          "context": {
            "snapshotTime": "2024-01-10T18:00:00Z"
          },
          "Id": "2024-01-12T23:59:59Z",
          "Name": "2024-01-12T23:59:59Z",
          "CA10__disappearanceTime__c": null
        },
        {
          "expectedResult": {
            "status": "COMPLIANT",
            "conditionIndex": "1899",
            "conditionText": "unitTest(2024-01-13T00:00:00Z): not('2024-01-13T00:00:00Z'.beforeToday())",
            "runtimeError": null
          },
          "context": {
            "snapshotTime": "2024-01-10T18:00:00Z"
          },
          "Id": "2024-01-13T00:00:00Z",
          "Name": "2024-01-13T00:00:00Z",
          "CA10__disappearanceTime__c": null
        },
        {
          "expectedResult": {
            "status": "COMPLIANT",
            "conditionIndex": "1999",
            "conditionText": "unitTest(2024-01-13T23:59:59Z): not('2024-01-13T23:59:59Z'.beforeToday())",
            "runtimeError": null
          },
          "context": {
            "snapshotTime": "2024-01-10T18:00:00Z"
          },
          "Id": "2024-01-13T23:59:59Z",
          "Name": "2024-01-13T23:59:59Z",
          "CA10__disappearanceTime__c": null
        },
        {
          "expectedResult": {
            "status": "COMPLIANT",
            "conditionIndex": "2099",
            "conditionText": "unitTest(2024-01-14T00:00:00Z): not('2024-01-14T00:00:00Z'.beforeToday())",
            "runtimeError": null
          },
          "context": {
            "snapshotTime": "2024-01-10T18:00:00Z"
          },
          "Id": "2024-01-14T00:00:00Z",
          "Name": "2024-01-14T00:00:00Z",
          "CA10__disappearanceTime__c": null
        },
        {
          "expectedResult": {
            "status": "COMPLIANT",
            "conditionIndex": "2199",
            "conditionText": "unitTest(2024-01-14T23:59:59Z): not('2024-01-14T23:59:59Z'.beforeToday())",
            "runtimeError": null
          },
          "context": {
            "snapshotTime": "2024-01-10T18:00:00Z"
          },
          "Id": "2024-01-14T23:59:59Z",
          "Name": "2024-01-14T23:59:59Z",
          "CA10__disappearanceTime__c": null
        },
        {
          "expectedResult": {
            "status": "COMPLIANT",
            "conditionIndex": "2299",
            "conditionText": "unitTest(2024-01-15T00:00:00Z): not('2024-01-15T00:00:00Z'.beforeToday())",
            "runtimeError": null
          },
          "context": {
            "snapshotTime": "2024-01-10T18:00:00Z"
          },
          "Id": "2024-01-15T00:00:00Z",
          "Name": "2024-01-15T00:00:00Z",
          "CA10__disappearanceTime__c": null
        },
        {
          "expectedResult": {
            "status": "COMPLIANT",
            "conditionIndex": "2399",
            "conditionText": "unitTest(2024-01-15T23:59:59Z): not('2024-01-15T23:59:59Z'.beforeToday())",
            "runtimeError": null
          },
          "context": {
            "snapshotTime": "2024-01-10T18:00:00Z"
          },
          "Id": "2024-01-15T23:59:59Z",
          "Name": "2024-01-15T23:59:59Z",
          "CA10__disappearanceTime__c": null
        },
        {
          "expectedResult": {
            "status": "COMPLIANT",
            "conditionIndex": "2499",
            "conditionText": "unitTest(Null-1): not(null.beforeToday())",
            "runtimeError": null
          },
          "context": {
            "snapshotTime": "2024-01-10T18:00:00Z"
          },
          "Id": "Null-1",
          "Name": "Null-1",
          "CA10__disappearanceTime__c": null
        }
      ]
script: |-
  CREATE TEMP FUNCTION mock_ExpectedResult()
  RETURNS ARRAY<STRUCT<
          Id STRING,
          expectedResult STRUCT<status STRING, conditionIndex DECIMAL, conditionText STRING, runtimeError STRING>
      >>
  DETERMINISTIC
  LANGUAGE js
  AS r"""
    return [ {
    "Id" : "2024-01-05T00:00:00Z",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "199",
      "conditionText" : "unitTest(2024-01-05T00:00:00Z): '2024-01-05T00:00:00Z'.beforeToday()",
      "runtimeError" : null
    }
  }, {
    "Id" : "2024-01-05T23:59:59Z",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "299",
      "conditionText" : "unitTest(2024-01-05T23:59:59Z): '2024-01-05T23:59:59Z'.beforeToday()",
      "runtimeError" : null
    }
  }, {
    "Id" : "2024-01-06T00:00:00Z",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "399",
      "conditionText" : "unitTest(2024-01-06T00:00:00Z): '2024-01-06T00:00:00Z'.beforeToday()",
      "runtimeError" : null
    }
  }, {
    "Id" : "2024-01-06T23:59:59Z",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "499",
      "conditionText" : "unitTest(2024-01-06T23:59:59Z): '2024-01-06T23:59:59Z'.beforeToday()",
      "runtimeError" : null
    }
  }, {
    "Id" : "2024-01-07T00:00:00Z",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "599",
      "conditionText" : "unitTest(2024-01-07T00:00:00Z): '2024-01-07T00:00:00Z'.beforeToday()",
      "runtimeError" : null
    }
  }, {
    "Id" : "2024-01-07T23:59:59Z",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "699",
      "conditionText" : "unitTest(2024-01-07T23:59:59Z): '2024-01-07T23:59:59Z'.beforeToday()",
      "runtimeError" : null
    }
  }, {
    "Id" : "2024-01-08T00:00:00Z",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "799",
      "conditionText" : "unitTest(2024-01-08T00:00:00Z): '2024-01-08T00:00:00Z'.beforeToday()",
      "runtimeError" : null
    }
  }, {
    "Id" : "2024-01-08T23:59:59Z",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "899",
      "conditionText" : "unitTest(2024-01-08T23:59:59Z): '2024-01-08T23:59:59Z'.beforeToday()",
      "runtimeError" : null
    }
  }, {
    "Id" : "2024-01-09T00:00:00Z",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "999",
      "conditionText" : "unitTest(2024-01-09T00:00:00Z): '2024-01-09T00:00:00Z'.beforeToday()",
      "runtimeError" : null
    }
  }, {
    "Id" : "2024-01-09T23:59:59Z",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "1099",
      "conditionText" : "unitTest(2024-01-09T23:59:59Z): '2024-01-09T23:59:59Z'.beforeToday()",
      "runtimeError" : null
    }
  }, {
    "Id" : "2024-01-10T00:00:00Z",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "1199",
      "conditionText" : "unitTest(2024-01-10T00:00:00Z): not('2024-01-10T00:00:00Z'.beforeToday())",
      "runtimeError" : null
    }
  }, {
    "Id" : "now",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "1299",
      "conditionText" : "unitTest(now): '2024-01-10T18:00:00Z' == '2024-01-10T18:00:00Z'",
      "runtimeError" : null
    }
  }, {
    "Id" : "2024-01-10T23:59:59Z",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "1399",
      "conditionText" : "unitTest(2024-01-10T23:59:59Z): not('2024-01-10T23:59:59Z'.beforeToday())",
      "runtimeError" : null
    }
  }, {
    "Id" : "2024-01-11T00:00:00Z",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "1499",
      "conditionText" : "unitTest(2024-01-11T00:00:00Z): not('2024-01-11T00:00:00Z'.beforeToday())",
      "runtimeError" : null
    }
  }, {
    "Id" : "2024-01-11T23:59:59Z",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "1599",
      "conditionText" : "unitTest(2024-01-11T23:59:59Z): not('2024-01-11T23:59:59Z'.beforeToday())",
      "runtimeError" : null
    }
  }, {
    "Id" : "2024-01-12T00:00:00Z",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "1699",
      "conditionText" : "unitTest(2024-01-12T00:00:00Z): not('2024-01-12T00:00:00Z'.beforeToday())",
      "runtimeError" : null
    }
  }, {
    "Id" : "2024-01-12T23:59:59Z",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "1799",
      "conditionText" : "unitTest(2024-01-12T23:59:59Z): not('2024-01-12T23:59:59Z'.beforeToday())",
      "runtimeError" : null
    }
  }, {
    "Id" : "2024-01-13T00:00:00Z",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "1899",
      "conditionText" : "unitTest(2024-01-13T00:00:00Z): not('2024-01-13T00:00:00Z'.beforeToday())",
      "runtimeError" : null
    }
  }, {
    "Id" : "2024-01-13T23:59:59Z",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "1999",
      "conditionText" : "unitTest(2024-01-13T23:59:59Z): not('2024-01-13T23:59:59Z'.beforeToday())",
      "runtimeError" : null
    }
  }, {
    "Id" : "2024-01-14T00:00:00Z",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "2099",
      "conditionText" : "unitTest(2024-01-14T00:00:00Z): not('2024-01-14T00:00:00Z'.beforeToday())",
      "runtimeError" : null
    }
  }, {
    "Id" : "2024-01-14T23:59:59Z",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "2199",
      "conditionText" : "unitTest(2024-01-14T23:59:59Z): not('2024-01-14T23:59:59Z'.beforeToday())",
      "runtimeError" : null
    }
  }, {
    "Id" : "2024-01-15T00:00:00Z",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "2299",
      "conditionText" : "unitTest(2024-01-15T00:00:00Z): not('2024-01-15T00:00:00Z'.beforeToday())",
      "runtimeError" : null
    }
  }, {
    "Id" : "2024-01-15T23:59:59Z",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "2399",
      "conditionText" : "unitTest(2024-01-15T23:59:59Z): not('2024-01-15T23:59:59Z'.beforeToday())",
      "runtimeError" : null
    }
  }, {
    "Id" : "Null-1",
    "expectedResult" : {
      "status" : "COMPLIANT",
      "conditionIndex" : "2499",
      "conditionText" : "unitTest(Null-1): not(null.beforeToday())",
      "runtimeError" : null
    }
  } ];
  """;

  CREATE TEMP FUNCTION mock_CA10__CaAwsInstance__c()
  RETURNS ARRAY<STRUCT<
      Id STRING,
      CA10__disappearanceTime__c TIMESTAMP,
      context STRUCT<
          snapshotTime TIMESTAMP
      >
  >>
  DETERMINISTIC
  LANGUAGE js
  AS r"""
    return [ {
    "context" : {
      "snapshotTime" : new Date("2024-01-10T18:00:00Z")
    },
    "Id" : "2024-01-05T00:00:00Z"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-01-10T18:00:00Z")
    },
    "Id" : "2024-01-05T23:59:59Z"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-01-10T18:00:00Z")
    },
    "Id" : "2024-01-06T00:00:00Z"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-01-10T18:00:00Z")
    },
    "Id" : "2024-01-06T23:59:59Z"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-01-10T18:00:00Z")
    },
    "Id" : "2024-01-07T00:00:00Z"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-01-10T18:00:00Z")
    },
    "Id" : "2024-01-07T23:59:59Z"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-01-10T18:00:00Z")
    },
    "Id" : "2024-01-08T00:00:00Z"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-01-10T18:00:00Z")
    },
    "Id" : "2024-01-08T23:59:59Z"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-01-10T18:00:00Z")
    },
    "Id" : "2024-01-09T00:00:00Z"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-01-10T18:00:00Z")
    },
    "Id" : "2024-01-09T23:59:59Z"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-01-10T18:00:00Z")
    },
    "Id" : "2024-01-10T00:00:00Z"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-01-10T18:00:00Z")
    },
    "Id" : "now"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-01-10T18:00:00Z")
    },
    "Id" : "2024-01-10T23:59:59Z"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-01-10T18:00:00Z")
    },
    "Id" : "2024-01-11T00:00:00Z"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-01-10T18:00:00Z")
    },
    "Id" : "2024-01-11T23:59:59Z"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-01-10T18:00:00Z")
    },
    "Id" : "2024-01-12T00:00:00Z"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-01-10T18:00:00Z")
    },
    "Id" : "2024-01-12T23:59:59Z"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-01-10T18:00:00Z")
    },
    "Id" : "2024-01-13T00:00:00Z"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-01-10T18:00:00Z")
    },
    "Id" : "2024-01-13T23:59:59Z"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-01-10T18:00:00Z")
    },
    "Id" : "2024-01-14T00:00:00Z"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-01-10T18:00:00Z")
    },
    "Id" : "2024-01-14T23:59:59Z"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-01-10T18:00:00Z")
    },
    "Id" : "2024-01-15T00:00:00Z"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-01-10T18:00:00Z")
    },
    "Id" : "2024-01-15T23:59:59Z"
  }, {
    "context" : {
      "snapshotTime" : new Date("2024-01-10T18:00:00Z")
    },
    "Id" : "Null-1"
  } ];
  """;

  CREATE TEMP FUNCTION process_CA10__CaAwsInstance__c(
      obj STRUCT<
          Id STRING,
          CA10__disappearanceTime__c TIMESTAMP
      >,
      snapshotTime TIMESTAMP
  )
  RETURNS STRUCT<status STRING, conditionIndex DECIMAL, conditionText STRING, currentStateMessage STRING, currentStateReferences STRING, remediation STRING, runtimeError STRING>
  DETERMINISTIC
  LANGUAGE js
  AS r"""
      var TemporalLib = new function () {
          var iso8601regex = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/
          this.checkIso8601 = function(arg) {
              return arg == null || iso8601regex.test(arg);
          };
          this.parseIso8601 = function(arg) {
              return new Date(arg);
          };
          this.replaceNullValues = function(arg, nullValues) {
              for (var i = 0; i < nullValues.length; i++) {
                  if (TextLib.equal(arg, nullValues[i])) {
                      return null;
                  }
              }
              return arg;
          };
      }();
      var today = new Date(snapshotTime.toISOString().substr(0,10)+'T00:00:00.000Z').getTime();
      var references1 = [];
      // condition[0], conditionIndex:[0..99]
      references1.push('Deleted From AWS [CA10__disappearanceTime__c]: ' + obj.CA10__disappearanceTime__c);
      if (obj.CA10__disappearanceTime__c != null) {
          return {status: 'DISAPPEARED', conditionIndex: 99, conditionText: "isDisappeared(CA10__disappearanceTime__c)", currentStateMessage: "Object is deleted in the source", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
      }
      // condition[1], conditionIndex:[100..199]
      function dateRelativeRange2() {
          var dateRelativeRange3 = TemporalLib.parseIso8601('2024-01-05T00:00:00Z');
          return dateRelativeRange3 != null && dateRelativeRange3.getTime() < today;
      }
      try {
          if (obj.Id == '2024-01-05T00:00:00Z' && dateRelativeRange2()) {
              return {status: 'COMPLIANT', conditionIndex: 199, conditionText: "unitTest(2024-01-05T00:00:00Z): '2024-01-05T00:00:00Z'.beforeToday()", currentStateMessage: "2024-01-05T00:00:00Z", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
          }
      } catch (err) {
          if (err.cause && err.cause.status) { return err.cause; } else { throw err; }
      }
      // condition[2], conditionIndex:[200..299]
      function dateRelativeRange4() {
          var dateRelativeRange5 = TemporalLib.parseIso8601('2024-01-05T23:59:59Z');
          return dateRelativeRange5 != null && dateRelativeRange5.getTime() < today;
      }
      try {
          if (obj.Id == '2024-01-05T23:59:59Z' && dateRelativeRange4()) {
              return {status: 'COMPLIANT', conditionIndex: 299, conditionText: "unitTest(2024-01-05T23:59:59Z): '2024-01-05T23:59:59Z'.beforeToday()", currentStateMessage: "2024-01-05T23:59:59Z", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
          }
      } catch (err) {
          if (err.cause && err.cause.status) { return err.cause; } else { throw err; }
      }
      // condition[3], conditionIndex:[300..399]
      function dateRelativeRange6() {
          var dateRelativeRange7 = TemporalLib.parseIso8601('2024-01-06T00:00:00Z');
          return dateRelativeRange7 != null && dateRelativeRange7.getTime() < today;
      }
      try {
          if (obj.Id == '2024-01-06T00:00:00Z' && dateRelativeRange6()) {
              return {status: 'COMPLIANT', conditionIndex: 399, conditionText: "unitTest(2024-01-06T00:00:00Z): '2024-01-06T00:00:00Z'.beforeToday()", currentStateMessage: "2024-01-06T00:00:00Z", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
          }
      } catch (err) {
          if (err.cause && err.cause.status) { return err.cause; } else { throw err; }
      }
      // condition[4], conditionIndex:[400..499]
      function dateRelativeRange8() {
          var dateRelativeRange9 = TemporalLib.parseIso8601('2024-01-06T23:59:59Z');
          return dateRelativeRange9 != null && dateRelativeRange9.getTime() < today;
      }
      try {
          if (obj.Id == '2024-01-06T23:59:59Z' && dateRelativeRange8()) {
              return {status: 'COMPLIANT', conditionIndex: 499, conditionText: "unitTest(2024-01-06T23:59:59Z): '2024-01-06T23:59:59Z'.beforeToday()", currentStateMessage: "2024-01-06T23:59:59Z", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
          }
      } catch (err) {
          if (err.cause && err.cause.status) { return err.cause; } else { throw err; }
      }
      // condition[5], conditionIndex:[500..599]
      function dateRelativeRange10() {
          var dateRelativeRange11 = TemporalLib.parseIso8601('2024-01-07T00:00:00Z');
          return dateRelativeRange11 != null && dateRelativeRange11.getTime() < today;
      }
      try {
          if (obj.Id == '2024-01-07T00:00:00Z' && dateRelativeRange10()) {
              return {status: 'COMPLIANT', conditionIndex: 599, conditionText: "unitTest(2024-01-07T00:00:00Z): '2024-01-07T00:00:00Z'.beforeToday()", currentStateMessage: "2024-01-07T00:00:00Z", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
          }
      } catch (err) {
          if (err.cause && err.cause.status) { return err.cause; } else { throw err; }
      }
      // condition[6], conditionIndex:[600..699]
      function dateRelativeRange12() {
          var dateRelativeRange13 = TemporalLib.parseIso8601('2024-01-07T23:59:59Z');
          return dateRelativeRange13 != null && dateRelativeRange13.getTime() < today;
      }
      try {
          if (obj.Id == '2024-01-07T23:59:59Z' && dateRelativeRange12()) {
              return {status: 'COMPLIANT', conditionIndex: 699, conditionText: "unitTest(2024-01-07T23:59:59Z): '2024-01-07T23:59:59Z'.beforeToday()", currentStateMessage: "2024-01-07T23:59:59Z", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
          }
      } catch (err) {
          if (err.cause && err.cause.status) { return err.cause; } else { throw err; }
      }
      // condition[7], conditionIndex:[700..799]
      function dateRelativeRange14() {
          var dateRelativeRange15 = TemporalLib.parseIso8601('2024-01-08T00:00:00Z');
          return dateRelativeRange15 != null && dateRelativeRange15.getTime() < today;
      }
      try {
          if (obj.Id == '2024-01-08T00:00:00Z' && dateRelativeRange14()) {
              return {status: 'COMPLIANT', conditionIndex: 799, conditionText: "unitTest(2024-01-08T00:00:00Z): '2024-01-08T00:00:00Z'.beforeToday()", currentStateMessage: "2024-01-08T00:00:00Z", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
          }
      } catch (err) {
          if (err.cause && err.cause.status) { return err.cause; } else { throw err; }
      }
      // condition[8], conditionIndex:[800..899]
      function dateRelativeRange16() {
          var dateRelativeRange17 = TemporalLib.parseIso8601('2024-01-08T23:59:59Z');
          return dateRelativeRange17 != null && dateRelativeRange17.getTime() < today;
      }
      try {
          if (obj.Id == '2024-01-08T23:59:59Z' && dateRelativeRange16()) {
              return {status: 'COMPLIANT', conditionIndex: 899, conditionText: "unitTest(2024-01-08T23:59:59Z): '2024-01-08T23:59:59Z'.beforeToday()", currentStateMessage: "2024-01-08T23:59:59Z", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
          }
      } catch (err) {
          if (err.cause && err.cause.status) { return err.cause; } else { throw err; }
      }
      // condition[9], conditionIndex:[900..999]
      function dateRelativeRange18() {
          var dateRelativeRange19 = TemporalLib.parseIso8601('2024-01-09T00:00:00Z');
          return dateRelativeRange19 != null && dateRelativeRange19.getTime() < today;
      }
      try {
          if (obj.Id == '2024-01-09T00:00:00Z' && dateRelativeRange18()) {
              return {status: 'COMPLIANT', conditionIndex: 999, conditionText: "unitTest(2024-01-09T00:00:00Z): '2024-01-09T00:00:00Z'.beforeToday()", currentStateMessage: "2024-01-09T00:00:00Z", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
          }
      } catch (err) {
          if (err.cause && err.cause.status) { return err.cause; } else { throw err; }
      }
      // condition[10], conditionIndex:[1000..1099]
      function dateRelativeRange20() {
          var dateRelativeRange21 = TemporalLib.parseIso8601('2024-01-09T23:59:59Z');
          return dateRelativeRange21 != null && dateRelativeRange21.getTime() < today;
      }
      try {
          if (obj.Id == '2024-01-09T23:59:59Z' && dateRelativeRange20()) {
              return {status: 'COMPLIANT', conditionIndex: 1099, conditionText: "unitTest(2024-01-09T23:59:59Z): '2024-01-09T23:59:59Z'.beforeToday()", currentStateMessage: "2024-01-09T23:59:59Z", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
          }
      } catch (err) {
          if (err.cause && err.cause.status) { return err.cause; } else { throw err; }
      }
      // condition[11], conditionIndex:[1100..1199]
      function dateRelativeRange22() {
          var dateRelativeRange23 = TemporalLib.parseIso8601('2024-01-10T00:00:00Z');
          return dateRelativeRange23 != null && dateRelativeRange23.getTime() < today;
      }
      try {
          if (obj.Id == '2024-01-10T00:00:00Z' && !dateRelativeRange22()) {
              return {status: 'COMPLIANT', conditionIndex: 1199, conditionText: "unitTest(2024-01-10T00:00:00Z): not('2024-01-10T00:00:00Z'.beforeToday())", currentStateMessage: "2024-01-10T00:00:00Z", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
          }
      } catch (err) {
          if (err.cause && err.cause.status) { return err.cause; } else { throw err; }
      }
      // condition[12], conditionIndex:[1200..1299]
      function dateTimeEqual24() {
          var equalLeft25 = TemporalLib.parseIso8601('2024-01-10T18:00:00Z');
          var equalRight26 = TemporalLib.parseIso8601('2024-01-10T18:00:00Z');
          return (equalLeft25 == null && equalRight26 == null) || (equalLeft25 != null && equalRight26 != null && equalLeft25.getTime() == equalRight26.getTime());
      }
      try {
          if (obj.Id == 'now' && dateTimeEqual24()) {
              return {status: 'COMPLIANT', conditionIndex: 1299, conditionText: "unitTest(now): '2024-01-10T18:00:00Z' == '2024-01-10T18:00:00Z'", currentStateMessage: "now", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
          }
      } catch (err) {
          if (err.cause && err.cause.status) { return err.cause; } else { throw err; }
      }
      // condition[13], conditionIndex:[1300..1399]
      function dateRelativeRange27() {
          var dateRelativeRange28 = TemporalLib.parseIso8601('2024-01-10T23:59:59Z');
          return dateRelativeRange28 != null && dateRelativeRange28.getTime() < today;
      }
      try {
          if (obj.Id == '2024-01-10T23:59:59Z' && !dateRelativeRange27()) {
              return {status: 'COMPLIANT', conditionIndex: 1399, conditionText: "unitTest(2024-01-10T23:59:59Z): not('2024-01-10T23:59:59Z'.beforeToday())", currentStateMessage: "2024-01-10T23:59:59Z", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
          }
      } catch (err) {
          if (err.cause && err.cause.status) { return err.cause; } else { throw err; }
      }
      // condition[14], conditionIndex:[1400..1499]
      function dateRelativeRange29() {
          var dateRelativeRange30 = TemporalLib.parseIso8601('2024-01-11T00:00:00Z');
          return dateRelativeRange30 != null && dateRelativeRange30.getTime() < today;
      }
      try {
          if (obj.Id == '2024-01-11T00:00:00Z' && !dateRelativeRange29()) {
              return {status: 'COMPLIANT', conditionIndex: 1499, conditionText: "unitTest(2024-01-11T00:00:00Z): not('2024-01-11T00:00:00Z'.beforeToday())", currentStateMessage: "2024-01-11T00:00:00Z", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
          }
      } catch (err) {
          if (err.cause && err.cause.status) { return err.cause; } else { throw err; }
      }
      // condition[15], conditionIndex:[1500..1599]
      function dateRelativeRange31() {
          var dateRelativeRange32 = TemporalLib.parseIso8601('2024-01-11T23:59:59Z');
          return dateRelativeRange32 != null && dateRelativeRange32.getTime() < today;
      }
      try {
          if (obj.Id == '2024-01-11T23:59:59Z' && !dateRelativeRange31()) {
              return {status: 'COMPLIANT', conditionIndex: 1599, conditionText: "unitTest(2024-01-11T23:59:59Z): not('2024-01-11T23:59:59Z'.beforeToday())", currentStateMessage: "2024-01-11T23:59:59Z", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
          }
      } catch (err) {
          if (err.cause && err.cause.status) { return err.cause; } else { throw err; }
      }
      // condition[16], conditionIndex:[1600..1699]
      function dateRelativeRange33() {
          var dateRelativeRange34 = TemporalLib.parseIso8601('2024-01-12T00:00:00Z');
          return dateRelativeRange34 != null && dateRelativeRange34.getTime() < today;
      }
      try {
          if (obj.Id == '2024-01-12T00:00:00Z' && !dateRelativeRange33()) {
              return {status: 'COMPLIANT', conditionIndex: 1699, conditionText: "unitTest(2024-01-12T00:00:00Z): not('2024-01-12T00:00:00Z'.beforeToday())", currentStateMessage: "2024-01-12T00:00:00Z", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
          }
      } catch (err) {
          if (err.cause && err.cause.status) { return err.cause; } else { throw err; }
      }
      // condition[17], conditionIndex:[1700..1799]
      function dateRelativeRange35() {
          var dateRelativeRange36 = TemporalLib.parseIso8601('2024-01-12T23:59:59Z');
          return dateRelativeRange36 != null && dateRelativeRange36.getTime() < today;
      }
      try {
          if (obj.Id == '2024-01-12T23:59:59Z' && !dateRelativeRange35()) {
              return {status: 'COMPLIANT', conditionIndex: 1799, conditionText: "unitTest(2024-01-12T23:59:59Z): not('2024-01-12T23:59:59Z'.beforeToday())", currentStateMessage: "2024-01-12T23:59:59Z", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
          }
      } catch (err) {
          if (err.cause && err.cause.status) { return err.cause; } else { throw err; }
      }
      // condition[18], conditionIndex:[1800..1899]
      function dateRelativeRange37() {
          var dateRelativeRange38 = TemporalLib.parseIso8601('2024-01-13T00:00:00Z');
          return dateRelativeRange38 != null && dateRelativeRange38.getTime() < today;
      }
      try {
          if (obj.Id == '2024-01-13T00:00:00Z' && !dateRelativeRange37()) {
              return {status: 'COMPLIANT', conditionIndex: 1899, conditionText: "unitTest(2024-01-13T00:00:00Z): not('2024-01-13T00:00:00Z'.beforeToday())", currentStateMessage: "2024-01-13T00:00:00Z", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
          }
      } catch (err) {
          if (err.cause && err.cause.status) { return err.cause; } else { throw err; }
      }
      // condition[19], conditionIndex:[1900..1999]
      function dateRelativeRange39() {
          var dateRelativeRange40 = TemporalLib.parseIso8601('2024-01-13T23:59:59Z');
          return dateRelativeRange40 != null && dateRelativeRange40.getTime() < today;
      }
      try {
          if (obj.Id == '2024-01-13T23:59:59Z' && !dateRelativeRange39()) {
              return {status: 'COMPLIANT', conditionIndex: 1999, conditionText: "unitTest(2024-01-13T23:59:59Z): not('2024-01-13T23:59:59Z'.beforeToday())", currentStateMessage: "2024-01-13T23:59:59Z", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
          }
      } catch (err) {
          if (err.cause && err.cause.status) { return err.cause; } else { throw err; }
      }
      // condition[20], conditionIndex:[2000..2099]
      function dateRelativeRange41() {
          var dateRelativeRange42 = TemporalLib.parseIso8601('2024-01-14T00:00:00Z');
          return dateRelativeRange42 != null && dateRelativeRange42.getTime() < today;
      }
      try {
          if (obj.Id == '2024-01-14T00:00:00Z' && !dateRelativeRange41()) {
              return {status: 'COMPLIANT', conditionIndex: 2099, conditionText: "unitTest(2024-01-14T00:00:00Z): not('2024-01-14T00:00:00Z'.beforeToday())", currentStateMessage: "2024-01-14T00:00:00Z", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
          }
      } catch (err) {
          if (err.cause && err.cause.status) { return err.cause; } else { throw err; }
      }
      // condition[21], conditionIndex:[2100..2199]
      function dateRelativeRange43() {
          var dateRelativeRange44 = TemporalLib.parseIso8601('2024-01-14T23:59:59Z');
          return dateRelativeRange44 != null && dateRelativeRange44.getTime() < today;
      }
      try {
          if (obj.Id == '2024-01-14T23:59:59Z' && !dateRelativeRange43()) {
              return {status: 'COMPLIANT', conditionIndex: 2199, conditionText: "unitTest(2024-01-14T23:59:59Z): not('2024-01-14T23:59:59Z'.beforeToday())", currentStateMessage: "2024-01-14T23:59:59Z", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
          }
      } catch (err) {
          if (err.cause && err.cause.status) { return err.cause; } else { throw err; }
      }
      // condition[22], conditionIndex:[2200..2299]
      function dateRelativeRange45() {
          var dateRelativeRange46 = TemporalLib.parseIso8601('2024-01-15T00:00:00Z');
          return dateRelativeRange46 != null && dateRelativeRange46.getTime() < today;
      }
      try {
          if (obj.Id == '2024-01-15T00:00:00Z' && !dateRelativeRange45()) {
              return {status: 'COMPLIANT', conditionIndex: 2299, conditionText: "unitTest(2024-01-15T00:00:00Z): not('2024-01-15T00:00:00Z'.beforeToday())", currentStateMessage: "2024-01-15T00:00:00Z", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
          }
      } catch (err) {
          if (err.cause && err.cause.status) { return err.cause; } else { throw err; }
      }
      // condition[23], conditionIndex:[2300..2399]
      function dateRelativeRange47() {
          var dateRelativeRange48 = TemporalLib.parseIso8601('2024-01-15T23:59:59Z');
          return dateRelativeRange48 != null && dateRelativeRange48.getTime() < today;
      }
      try {
          if (obj.Id == '2024-01-15T23:59:59Z' && !dateRelativeRange47()) {
              return {status: 'COMPLIANT', conditionIndex: 2399, conditionText: "unitTest(2024-01-15T23:59:59Z): not('2024-01-15T23:59:59Z'.beforeToday())", currentStateMessage: "2024-01-15T23:59:59Z", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
          }
      } catch (err) {
          if (err.cause && err.cause.status) { return err.cause; } else { throw err; }
      }
      // condition[24], conditionIndex:[2400..2499]
      if (obj.Id == 'Null-1' && !(null != null && null.getTime() < today)) {
          return {status: 'COMPLIANT', conditionIndex: 2499, conditionText: "unitTest(Null-1): not(null.beforeToday())", currentStateMessage: "Null-1", currentStateReferences: references1.join('\n'), remediation: null, runtimeError: null};
      }
      return {status: 'INCOMPLIANT', conditionIndex: 2500, conditionText: "otherwise", currentStateMessage: "Test Failed", currentStateReferences: references1.join('\n'), remediation: "Developer Fix Required", runtimeError: null};
  """;


  SELECT
    expectedResult.Id as Id,
    IF (
      IFNULL(expectedResult.expectedResult.status, '') = IFNULL(sObject.result.status, '')
      AND IFNULL(expectedResult.expectedResult.conditionIndex, -1) = IFNULL(sObject.result.conditionIndex, -1)
      AND IFNULL(expectedResult.expectedResult.conditionText, '') = IFNULL(sObject.result.conditionText, '')
      AND IFNULL(expectedResult.expectedResult.runtimeError, '') = IFNULL(sObject.result.runtimeError, ''),
      "MATCH",
      "FAIL"
    ) as match,
    expectedResult.expectedResult.status as expectedStatus, sObject.result.status as actualStatus,
    expectedResult.expectedResult.conditionIndex as expectedConditionIndex, sObject.result.conditionIndex as actualConditionIndex,
    expectedResult.expectedResult.conditionText as expectedConditionText, sObject.result.conditionText as actualConditionText,
    expectedResult.expectedResult.runtimeError as expectedRuntimeError, sObject.result.runtimeError as actualRuntimeError
  FROM UNNEST(mock_ExpectedResult()) expectedResult
  LEFT JOIN (
      SELECT
          sObject.Id AS Id,
          sObject.CA10__disappearanceTime__c AS CA10__disappearanceTime__c,
          process_CA10__CaAwsInstance__c(
              STRUCT(
                  sObject.Id AS Id,
                  sObject.CA10__disappearanceTime__c AS CA10__disappearanceTime__c
              ),
              sObject.context.snapshotTime
          ) as result
      FROM UNNEST(mock_CA10__CaAwsInstance__c()) AS sObject
  ) sObject ON sObject.Id = expectedResult.Id;
