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

public final class OptionBPropertiesAutoGeneratedTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        OptionBPropertiesAutoGenerated model =
            BinaryData
                .fromString(
                    "{\"importRouteTargets\":[\"xtgqscjavftjuh\",\"qaz\",\"mtggu\"],\"exportRouteTargets\":[\"ijr\",\"jcivmmg\",\"f\",\"fiwrxgkn\"]}")
                .toObject(OptionBPropertiesAutoGenerated.class);
        Assertions.assertEquals("xtgqscjavftjuh", model.importRouteTargets().get(0));
        Assertions.assertEquals("ijr", model.exportRouteTargets().get(0));
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        OptionBPropertiesAutoGenerated model =
            new OptionBPropertiesAutoGenerated()
                .withImportRouteTargets(Arrays.asList("xtgqscjavftjuh", "qaz", "mtggu"))
                .withExportRouteTargets(Arrays.asList("ijr", "jcivmmg", "f", "fiwrxgkn"));
        model = BinaryData.fromObject(model).toObject(OptionBPropertiesAutoGenerated.class);
        Assertions.assertEquals("xtgqscjavftjuh", model.importRouteTargets().get(0));
        Assertions.assertEquals("ijr", model.exportRouteTargets().get(0));
    }
}
