// 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.VirtualNetworkLinkSubResourceProperties;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class VirtualNetworkLinkSubResourcePropertiesTests {
    @Test
    public void testDeserialize() {
        VirtualNetworkLinkSubResourceProperties model =
            BinaryData
                .fromString("{\"virtualNetworkLink\":{\"id\":\"wutttxfvjrbi\"}}")
                .toObject(VirtualNetworkLinkSubResourceProperties.class);
        Assertions.assertEquals("wutttxfvjrbi", model.virtualNetworkLink().id());
    }

    @Test
    public void testSerialize() {
        VirtualNetworkLinkSubResourceProperties model =
            new VirtualNetworkLinkSubResourceProperties()
                .withVirtualNetworkLink(new SubResource().withId("wutttxfvjrbi"));
        model = BinaryData.fromObject(model).toObject(VirtualNetworkLinkSubResourceProperties.class);
        Assertions.assertEquals("wutttxfvjrbi", model.virtualNetworkLink().id());
    }
}
