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

package com.azure.resourcemanager.databricks.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.databricks.models.AddressSpace;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class AddressSpaceTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AddressSpace model =
            BinaryData.fromString("{\"addressPrefixes\":[\"kevle\",\"gz\"]}").toObject(AddressSpace.class);
        Assertions.assertEquals("kevle", model.addressPrefixes().get(0));
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AddressSpace model = new AddressSpace().withAddressPrefixes(Arrays.asList("kevle", "gz"));
        model = BinaryData.fromObject(model).toObject(AddressSpace.class);
        Assertions.assertEquals("kevle", model.addressPrefixes().get(0));
    }
}
