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

public final class PrefixListResourceInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        PrefixListResourceInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"description\":\"ff\",\"prefixList\":[\"fblcq\",\"u\",\"bgq\"],\"etag\":\"rtalmet\",\"auditComment\":\"wgdsl\",\"provisioningState\":\"Canceled\"},\"id\":\"hrmooi\",\"name\":\"qseypxiutcxa\",\"type\":\"zhyrpeto\"}")
                .toObject(PrefixListResourceInner.class);
        Assertions.assertEquals("ff", model.description());
        Assertions.assertEquals("fblcq", model.prefixList().get(0));
        Assertions.assertEquals("rtalmet", model.etag());
        Assertions.assertEquals("wgdsl", model.auditComment());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        PrefixListResourceInner model =
            new PrefixListResourceInner()
                .withDescription("ff")
                .withPrefixList(Arrays.asList("fblcq", "u", "bgq"))
                .withEtag("rtalmet")
                .withAuditComment("wgdsl");
        model = BinaryData.fromObject(model).toObject(PrefixListResourceInner.class);
        Assertions.assertEquals("ff", model.description());
        Assertions.assertEquals("fblcq", model.prefixList().get(0));
        Assertions.assertEquals("rtalmet", model.etag());
        Assertions.assertEquals("wgdsl", model.auditComment());
    }
}
