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

package com.azure.resourcemanager.managednetworkfabric.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.managednetworkfabric.models.Layer2Configuration;
import org.junit.jupiter.api.Assertions;

public final class Layer2ConfigurationTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        Layer2Configuration model =
            BinaryData
                .fromString("{\"portCount\":32473122,\"mtu\":1835039462,\"interfaces\":[\"hrphkmcrjdqn\"]}")
                .toObject(Layer2Configuration.class);
        Assertions.assertEquals(32473122, model.portCount());
        Assertions.assertEquals(1835039462, model.mtu());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        Layer2Configuration model = new Layer2Configuration().withPortCount(32473122).withMtu(1835039462);
        model = BinaryData.fromObject(model).toObject(Layer2Configuration.class);
        Assertions.assertEquals(32473122, model.portCount());
        Assertions.assertEquals(1835039462, model.mtu());
    }
}
