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

public final class FqdnObjectTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        FqdnObject model =
            BinaryData
                .fromString(
                    "{\"description\":\"dslfhotwmcy\",\"fqdnList\":[\"wlbjnpgacftade\",\"xnltyfsoppu\"],\"etag\":\"esnzwde\",\"auditComment\":\"avo\",\"provisioningState\":\"Deleting\"}")
                .toObject(FqdnObject.class);
        Assertions.assertEquals("dslfhotwmcy", model.description());
        Assertions.assertEquals("wlbjnpgacftade", model.fqdnList().get(0));
        Assertions.assertEquals("esnzwde", model.etag());
        Assertions.assertEquals("avo", model.auditComment());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        FqdnObject model =
            new FqdnObject()
                .withDescription("dslfhotwmcy")
                .withFqdnList(Arrays.asList("wlbjnpgacftade", "xnltyfsoppu"))
                .withEtag("esnzwde")
                .withAuditComment("avo");
        model = BinaryData.fromObject(model).toObject(FqdnObject.class);
        Assertions.assertEquals("dslfhotwmcy", model.description());
        Assertions.assertEquals("wlbjnpgacftade", model.fqdnList().get(0));
        Assertions.assertEquals("esnzwde", model.etag());
        Assertions.assertEquals("avo", model.auditComment());
    }
}
