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

package com.azure.resourcemanager.loadtesting.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.loadtesting.models.EncryptionPropertiesIdentity;
import com.azure.resourcemanager.loadtesting.models.Type;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class EncryptionPropertiesIdentityTests {
    @Test
    public void testDeserialize() throws Exception {
        EncryptionPropertiesIdentity model =
            BinaryData
                .fromString("{\"type\":\"SystemAssigned\",\"resourceId\":\"qytbciq\"}")
                .toObject(EncryptionPropertiesIdentity.class);
        Assertions.assertEquals(Type.SYSTEM_ASSIGNED, model.type());
        Assertions.assertEquals("qytbciq", model.resourceId());
    }

    @Test
    public void testSerialize() throws Exception {
        EncryptionPropertiesIdentity model =
            new EncryptionPropertiesIdentity().withType(Type.SYSTEM_ASSIGNED).withResourceId("qytbciq");
        model = BinaryData.fromObject(model).toObject(EncryptionPropertiesIdentity.class);
        Assertions.assertEquals(Type.SYSTEM_ASSIGNED, model.type());
        Assertions.assertEquals("qytbciq", model.resourceId());
    }
}
