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

public final class CategoryTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        Category model =
            BinaryData
                .fromString(
                    "{\"urlCustom\":[\"ebwwaloayqc\",\"wrtz\",\"uzgwyzmhtx\",\"ngmtsavjcb\"],\"feeds\":[\"xqpsrknftguv\",\"iuhprwmdyvxqta\",\"riwwroy\",\"bexrmcq\"]}")
                .toObject(Category.class);
        Assertions.assertEquals("ebwwaloayqc", model.urlCustom().get(0));
        Assertions.assertEquals("xqpsrknftguv", model.feeds().get(0));
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        Category model =
            new Category()
                .withUrlCustom(Arrays.asList("ebwwaloayqc", "wrtz", "uzgwyzmhtx", "ngmtsavjcb"))
                .withFeeds(Arrays.asList("xqpsrknftguv", "iuhprwmdyvxqta", "riwwroy", "bexrmcq"));
        model = BinaryData.fromObject(model).toObject(Category.class);
        Assertions.assertEquals("ebwwaloayqc", model.urlCustom().get(0));
        Assertions.assertEquals("xqpsrknftguv", model.feeds().get(0));
    }
}
