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

package com.azure.resourcemanager.storagecache.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.storagecache.models.NamespaceJunction;
import org.junit.jupiter.api.Assertions;

public final class NamespaceJunctionTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        NamespaceJunction model =
            BinaryData
                .fromString(
                    "{\"namespacePath\":\"mabiknsorgjhxb\",\"targetPath\":\"tlwwrlk\",\"nfsExport\":\"tncvokot\",\"nfsAccessPolicy\":\"xdy\"}")
                .toObject(NamespaceJunction.class);
        Assertions.assertEquals("mabiknsorgjhxb", model.namespacePath());
        Assertions.assertEquals("tlwwrlk", model.targetPath());
        Assertions.assertEquals("tncvokot", model.nfsExport());
        Assertions.assertEquals("xdy", model.nfsAccessPolicy());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        NamespaceJunction model =
            new NamespaceJunction()
                .withNamespacePath("mabiknsorgjhxb")
                .withTargetPath("tlwwrlk")
                .withNfsExport("tncvokot")
                .withNfsAccessPolicy("xdy");
        model = BinaryData.fromObject(model).toObject(NamespaceJunction.class);
        Assertions.assertEquals("mabiknsorgjhxb", model.namespacePath());
        Assertions.assertEquals("tlwwrlk", model.targetPath());
        Assertions.assertEquals("tncvokot", model.nfsExport());
        Assertions.assertEquals("xdy", model.nfsAccessPolicy());
    }
}
