cases:
  - note: wraps properties
    input:
      name: myStorage
      type: "Microsoft.Storage/storageAccounts"
      location: westus2
      supportshttpstrafficonly: true
      ishnsenabled: false
    expected_denormalized:
      name: myStorage
      type: "Microsoft.Storage/storageAccounts"
      location: westus2
      properties:
        supportshttpstrafficonly: true
        ishnsenabled: false
    reverse_round_trip: true

  - note: non-object returns clone
    input: "just a string"
    expected_denormalized: "just a string"
    reverse_round_trip: true

  - note: empty normalized
    input: {}
    expected_denormalized: {}
    reverse_round_trip: true

  - note: preserves root fields
    input:
      name: r
      type: t
      location: l
      kind: k
      id: "/sub/rg/r"
      tags:
        env: prod
      identity:
        type: SystemAssigned
        principalid: pid-123
        userassignedidentities:
          /subscriptions/Sub/resourceGroups/Rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/Uai1: {}
      sku:
        name: Basic
      plan:
        name: p1
      zones: ["1", "2"]
      managedby: "/sub/other"
      etag: "W/\"abc\""
      apiversion: "2023-01-01"
      fullname: parent/child
      systemdata:
        createdby: admin
      extendedlocation:
        name: edge1
        type: EdgeZone
    expected_denormalized:
      name: r
      type: t
      location: l
      kind: k
      id: "/sub/rg/r"
      tags:
        env: prod
      identity:
        type: SystemAssigned
        principalId: pid-123
        userAssignedIdentities:
          /subscriptions/Sub/resourceGroups/Rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/Uai1: {}
      sku:
        name: Basic
      plan:
        name: p1
      zones: ["1", "2"]
      managedBy: "/sub/other"
      etag: "W/\"abc\""
      apiVersion: "2023-01-01"
      fullName: parent/child
      systemData:
        createdBy: admin
      extendedLocation:
        name: edge1
        type: EdgeZone
    reverse_round_trip: true
