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

package com.azure.resourcemanager.hybridcontainerservice.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.hybridcontainerservice.models.ProvisionedClusterIdentity;
import com.azure.resourcemanager.hybridcontainerservice.models.ResourceIdentityType;
import org.junit.jupiter.api.Assertions;

public final class ProvisionedClusterIdentityTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ProvisionedClusterIdentity model =
            BinaryData
                .fromString("{\"principalId\":\"felluwfzitonpe\",\"tenantId\":\"pjkjlxofpdv\",\"type\":\"None\"}")
                .toObject(ProvisionedClusterIdentity.class);
        Assertions.assertEquals(ResourceIdentityType.NONE, model.type());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ProvisionedClusterIdentity model = new ProvisionedClusterIdentity().withType(ResourceIdentityType.NONE);
        model = BinaryData.fromObject(model).toObject(ProvisionedClusterIdentity.class);
        Assertions.assertEquals(ResourceIdentityType.NONE, model.type());
    }
}
