// 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.RulestackDetails;
import org.junit.jupiter.api.Assertions;

public final class RulestackDetailsTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        RulestackDetails model =
            BinaryData
                .fromString(
                    "{\"resourceId\":\"izsjqlhkrr\",\"rulestackId\":\"deibqip\",\"location\":\"ghvxndzwmkrefa\"}")
                .toObject(RulestackDetails.class);
        Assertions.assertEquals("izsjqlhkrr", model.resourceId());
        Assertions.assertEquals("deibqip", model.rulestackId());
        Assertions.assertEquals("ghvxndzwmkrefa", model.location());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        RulestackDetails model =
            new RulestackDetails()
                .withResourceId("izsjqlhkrr")
                .withRulestackId("deibqip")
                .withLocation("ghvxndzwmkrefa");
        model = BinaryData.fromObject(model).toObject(RulestackDetails.class);
        Assertions.assertEquals("izsjqlhkrr", model.resourceId());
        Assertions.assertEquals("deibqip", model.rulestackId());
        Assertions.assertEquals("ghvxndzwmkrefa", model.location());
    }
}
