// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.paloaltonetworks.ngfw.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.paloaltonetworks.ngfw.models.AzureResourceManagerUserAssignedIdentity;
import org.junit.jupiter.api.Assertions;

public final class AzureResourceManagerUserAssignedIdentityTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AzureResourceManagerUserAssignedIdentity model =
            BinaryData
                .fromString("{\"clientId\":\"yxolniwp\",\"principalId\":\"ukjfkgiawxklr\"}")
                .toObject(AzureResourceManagerUserAssignedIdentity.class);
        Assertions.assertEquals("yxolniwp", model.clientId());
        Assertions.assertEquals("ukjfkgiawxklr", model.principalId());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AzureResourceManagerUserAssignedIdentity model =
            new AzureResourceManagerUserAssignedIdentity().withClientId("yxolniwp").withPrincipalId("ukjfkgiawxklr");
        model = BinaryData.fromObject(model).toObject(AzureResourceManagerUserAssignedIdentity.class);
        Assertions.assertEquals("yxolniwp", model.clientId());
        Assertions.assertEquals("ukjfkgiawxklr", model.principalId());
    }
}
