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

package com.azure.resourcemanager.paloaltonetworks.ngfw.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.paloaltonetworks.ngfw.fluent.models.FqdnListGlobalRulestackResourceInner;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class FqdnListGlobalRulestackResourceInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        FqdnListGlobalRulestackResourceInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"description\":\"feallnwsu\",\"fqdnList\":[\"snjampmng\",\"zscxaqwo\",\"chcbonqvpkvlrxnj\"],\"etag\":\"seiphe\",\"auditComment\":\"lokeyy\",\"provisioningState\":\"NotSpecified\"},\"id\":\"bdlwtgrhpdjpj\",\"name\":\"masxazjpqyegu\",\"type\":\"lhbxxhejjzzvdud\"}")
                .toObject(FqdnListGlobalRulestackResourceInner.class);
        Assertions.assertEquals("feallnwsu", model.description());
        Assertions.assertEquals("snjampmng", model.fqdnList().get(0));
        Assertions.assertEquals("seiphe", model.etag());
        Assertions.assertEquals("lokeyy", model.auditComment());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        FqdnListGlobalRulestackResourceInner model =
            new FqdnListGlobalRulestackResourceInner()
                .withDescription("feallnwsu")
                .withFqdnList(Arrays.asList("snjampmng", "zscxaqwo", "chcbonqvpkvlrxnj"))
                .withEtag("seiphe")
                .withAuditComment("lokeyy");
        model = BinaryData.fromObject(model).toObject(FqdnListGlobalRulestackResourceInner.class);
        Assertions.assertEquals("feallnwsu", model.description());
        Assertions.assertEquals("snjampmng", model.fqdnList().get(0));
        Assertions.assertEquals("seiphe", model.etag());
        Assertions.assertEquals("lokeyy", model.auditComment());
    }
}
