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

package com.azure.resourcemanager.recoveryservicesbackup.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.recoveryservicesbackup.models.ContainerIdentityInfo;
import org.junit.jupiter.api.Assertions;

public final class ContainerIdentityInfoTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ContainerIdentityInfo model =
            BinaryData
                .fromString(
                    "{\"uniqueName\":\"yvpkpatlbijpzgsk\",\"aadTenantId\":\"fhfv\",\"servicePrincipalClientId\":\"mknbnxwcdommpv\",\"audience\":\"awz\"}")
                .toObject(ContainerIdentityInfo.class);
        Assertions.assertEquals("yvpkpatlbijpzgsk", model.uniqueName());
        Assertions.assertEquals("fhfv", model.aadTenantId());
        Assertions.assertEquals("mknbnxwcdommpv", model.servicePrincipalClientId());
        Assertions.assertEquals("awz", model.audience());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ContainerIdentityInfo model =
            new ContainerIdentityInfo()
                .withUniqueName("yvpkpatlbijpzgsk")
                .withAadTenantId("fhfv")
                .withServicePrincipalClientId("mknbnxwcdommpv")
                .withAudience("awz");
        model = BinaryData.fromObject(model).toObject(ContainerIdentityInfo.class);
        Assertions.assertEquals("yvpkpatlbijpzgsk", model.uniqueName());
        Assertions.assertEquals("fhfv", model.aadTenantId());
        Assertions.assertEquals("mknbnxwcdommpv", model.servicePrincipalClientId());
        Assertions.assertEquals("awz", model.audience());
    }
}
