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

package com.azure.resourcemanager.frontdoor.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.frontdoor.models.WebApplicationFirewallPolicyList;
import org.junit.jupiter.api.Assertions;

public final class WebApplicationFirewallPolicyListTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        WebApplicationFirewallPolicyList model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"properties\":{\"frontendEndpointLinks\":[],\"routingRuleLinks\":[],\"securityPolicyLinks\":[],\"provisioningState\":\"ybczmehmtzo\",\"resourceState\":\"Deleting\"},\"etag\":\"h\",\"sku\":{\"name\":\"Premium_AzureFrontDoor\"},\"location\":\"dgs\",\"tags\":{\"sx\":\"ejhphoyc\",\"tbmufpo\":\"obhdxbmtqioqjze\",\"hwlrx\":\"noi\",\"dmbpazlobcufpdz\":\"bqsoqijg\"},\"id\":\"rbt\",\"name\":\"qqjnqgl\",\"type\":\"qgn\"},{\"properties\":{\"frontendEndpointLinks\":[],\"routingRuleLinks\":[],\"securityPolicyLinks\":[],\"provisioningState\":\"fsqesaagdfmglzlh\",\"resourceState\":\"Deleting\"},\"etag\":\"f\",\"sku\":{\"name\":\"Premium_AzureFrontDoor\"},\"location\":\"vktsizntocipao\",\"tags\":{\"kfo\":\"psqucmpoyf\"},\"id\":\"knygjofjddeq\",\"name\":\"rd\",\"type\":\"upewnwreitjzy\"},{\"properties\":{\"frontendEndpointLinks\":[],\"routingRuleLinks\":[],\"securityPolicyLinks\":[],\"provisioningState\":\"fcqhsmyurkd\",\"resourceState\":\"Creating\"},\"etag\":\"he\",\"sku\":{\"name\":\"Classic_AzureFrontDoor\"},\"location\":\"jtxukcdm\",\"tags\":{\"w\":\"cryuan\",\"pmrqobm\":\"xzdxtayrlhmwh\",\"knryrtihfxtij\":\"u\",\"zk\":\"pzvgnwzsymglzufc\"},\"id\":\"hdbihan\",\"name\":\"fhfcb\",\"type\":\"y\"}],\"nextLink\":\"git\"}")
                .toObject(WebApplicationFirewallPolicyList.class);
        Assertions.assertEquals("git", model.nextLink());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        WebApplicationFirewallPolicyList model = new WebApplicationFirewallPolicyList().withNextLink("git");
        model = BinaryData.fromObject(model).toObject(WebApplicationFirewallPolicyList.class);
        Assertions.assertEquals("git", model.nextLink());
    }
}
