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

public final class OptionBPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        OptionBProperties model =
            BinaryData
                .fromString(
                    "{\"importRouteTargets\":[\"wxqibyq\",\"nyowxwlmdjrkvfg\",\"vfvpdbodaciz\"],\"exportRouteTargets\":[\"lhkrribdeibqipqk\"]}")
                .toObject(OptionBProperties.class);
        Assertions.assertEquals("wxqibyq", model.importRouteTargets().get(0));
        Assertions.assertEquals("lhkrribdeibqipqk", model.exportRouteTargets().get(0));
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        OptionBProperties model =
            new OptionBProperties()
                .withImportRouteTargets(Arrays.asList("wxqibyq", "nyowxwlmdjrkvfg", "vfvpdbodaciz"))
                .withExportRouteTargets(Arrays.asList("lhkrribdeibqipqk"));
        model = BinaryData.fromObject(model).toObject(OptionBProperties.class);
        Assertions.assertEquals("wxqibyq", model.importRouteTargets().get(0));
        Assertions.assertEquals("lhkrribdeibqipqk", model.exportRouteTargets().get(0));
    }
}
