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

package com.azure.resourcemanager.sqlvirtualmachine.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.sqlvirtualmachine.models.PrivateIpAddress;
import org.junit.jupiter.api.Assertions;

public final class PrivateIpAddressTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        PrivateIpAddress model =
            BinaryData
                .fromString("{\"ipAddress\":\"mfdatscmdvpj\",\"subnetResourceId\":\"lsuuvmkjozkrwfnd\"}")
                .toObject(PrivateIpAddress.class);
        Assertions.assertEquals("mfdatscmdvpj", model.ipAddress());
        Assertions.assertEquals("lsuuvmkjozkrwfnd", model.subnetResourceId());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        PrivateIpAddress model =
            new PrivateIpAddress().withIpAddress("mfdatscmdvpj").withSubnetResourceId("lsuuvmkjozkrwfnd");
        model = BinaryData.fromObject(model).toObject(PrivateIpAddress.class);
        Assertions.assertEquals("mfdatscmdvpj", model.ipAddress());
        Assertions.assertEquals("lsuuvmkjozkrwfnd", model.subnetResourceId());
    }
}
