// 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.FqdnListLocalRulestackResourceInner;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class FqdnListLocalRulestackResourceInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        FqdnListLocalRulestackResourceInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"description\":\"bzo\",\"fqdnList\":[\"culapzwyrpgogtq\",\"epnylbfu\"],\"etag\":\"lyjt\",\"auditComment\":\"of\",\"provisioningState\":\"NotSpecified\"},\"id\":\"fcibyfmowuxrkj\",\"name\":\"vdwxfzwi\",\"type\":\"vwzjbhyz\"}")
                .toObject(FqdnListLocalRulestackResourceInner.class);
        Assertions.assertEquals("bzo", model.description());
        Assertions.assertEquals("culapzwyrpgogtq", model.fqdnList().get(0));
        Assertions.assertEquals("lyjt", model.etag());
        Assertions.assertEquals("of", model.auditComment());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        FqdnListLocalRulestackResourceInner model =
            new FqdnListLocalRulestackResourceInner()
                .withDescription("bzo")
                .withFqdnList(Arrays.asList("culapzwyrpgogtq", "epnylbfu"))
                .withEtag("lyjt")
                .withAuditComment("of");
        model = BinaryData.fromObject(model).toObject(FqdnListLocalRulestackResourceInner.class);
        Assertions.assertEquals("bzo", model.description());
        Assertions.assertEquals("culapzwyrpgogtq", model.fqdnList().get(0));
        Assertions.assertEquals("lyjt", model.etag());
        Assertions.assertEquals("of", model.auditComment());
    }
}
