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

package com.azure.resourcemanager.hybridnetwork.generated;

import com.azure.core.management.SubResource;
import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.hybridnetwork.models.AzureStackEdgeFormat;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class AzureStackEdgeFormatTests {
    @Test
    public void testDeserialize() {
        AzureStackEdgeFormat model =
            BinaryData
                .fromString(
                    "{\"deviceType\":\"AzureStackEdge\",\"azureStackEdge\":{\"id\":\"avxbniwdjswztsdb\"},\"status\":\"NotRegistered\",\"provisioningState\":\"Failed\",\"networkFunctions\":[{\"id\":\"pzxbz\"}]}")
                .toObject(AzureStackEdgeFormat.class);
        Assertions.assertEquals("avxbniwdjswztsdb", model.azureStackEdge().id());
    }

    @Test
    public void testSerialize() {
        AzureStackEdgeFormat model =
            new AzureStackEdgeFormat().withAzureStackEdge(new SubResource().withId("avxbniwdjswztsdb"));
        model = BinaryData.fromObject(model).toObject(AzureStackEdgeFormat.class);
        Assertions.assertEquals("avxbniwdjswztsdb", model.azureStackEdge().id());
    }
}
