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

package com.azure.resourcemanager.dnsresolver.generated;

import com.azure.core.management.SubResource;
import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.dnsresolver.fluent.models.OutboundEndpointProperties;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class OutboundEndpointPropertiesTests {
    @Test
    public void testDeserialize() {
        OutboundEndpointProperties model =
            BinaryData
                .fromString(
                    "{\"subnet\":{\"id\":\"wckbasyypnd\"},\"provisioningState\":\"Updating\",\"resourceGuid\":\"cbacphejkotynqg\"}")
                .toObject(OutboundEndpointProperties.class);
        Assertions.assertEquals("wckbasyypnd", model.subnet().id());
    }

    @Test
    public void testSerialize() {
        OutboundEndpointProperties model =
            new OutboundEndpointProperties().withSubnet(new SubResource().withId("wckbasyypnd"));
        model = BinaryData.fromObject(model).toObject(OutboundEndpointProperties.class);
        Assertions.assertEquals("wckbasyypnd", model.subnet().id());
    }
}
