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

package com.azure.resourcemanager.subscription.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.subscription.fluent.models.PutAliasResponseInner;
import com.azure.resourcemanager.subscription.models.ProvisioningState;
import com.azure.resourcemanager.subscription.models.PutAliasResponseProperties;
import org.junit.jupiter.api.Assertions;

public final class PutAliasResponseInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        PutAliasResponseInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"subscriptionId\":\"uf\",\"provisioningState\":\"Succeeded\"},\"id\":\"ymzidn\",\"name\":\"ezcxtbzsgfyccsne\",\"type\":\"mdwzjeiachboo\"}")
                .toObject(PutAliasResponseInner.class);
        Assertions.assertEquals(ProvisioningState.SUCCEEDED, model.properties().provisioningState());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        PutAliasResponseInner model =
            new PutAliasResponseInner()
                .withProperties(new PutAliasResponseProperties().withProvisioningState(ProvisioningState.SUCCEEDED));
        model = BinaryData.fromObject(model).toObject(PutAliasResponseInner.class);
        Assertions.assertEquals(ProvisioningState.SUCCEEDED, model.properties().provisioningState());
    }
}
