// 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.util.BinaryData;
import com.azure.resourcemanager.dnsresolver.fluent.models.VirtualNetworkDnsForwardingRulesetInner;
import com.azure.resourcemanager.dnsresolver.models.VirtualNetworkDnsForwardingRulesetListResult;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class VirtualNetworkDnsForwardingRulesetListResultTests {
    @Test
    public void testDeserialize() {
        VirtualNetworkDnsForwardingRulesetListResult model =
            BinaryData
                .fromString("{\"value\":[{\"id\":\"frzpwvlqdqgb\",\"properties\":{}}],\"nextLink\":\"ihkaetcktvfc\"}")
                .toObject(VirtualNetworkDnsForwardingRulesetListResult.class);
        Assertions.assertEquals("frzpwvlqdqgb", model.value().get(0).id());
    }

    @Test
    public void testSerialize() {
        VirtualNetworkDnsForwardingRulesetListResult model =
            new VirtualNetworkDnsForwardingRulesetListResult()
                .withValue(Arrays.asList(new VirtualNetworkDnsForwardingRulesetInner().withId("frzpwvlqdqgb")));
        model = BinaryData.fromObject(model).toObject(VirtualNetworkDnsForwardingRulesetListResult.class);
        Assertions.assertEquals("frzpwvlqdqgb", model.value().get(0).id());
    }
}
