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

package com.azure.resourcemanager.datalakeanalytics.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.datalakeanalytics.models.VirtualNetworkRule;
import org.junit.jupiter.api.Assertions;

public final class VirtualNetworkRuleTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        VirtualNetworkRule model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"subnetId\":\"stkiiuxhqyud\",\"virtualNetworkRuleState\":\"Failed\"},\"name\":\"qn\",\"type\":\"oczvy\",\"id\":\"qrvkdv\"}")
                .toObject(VirtualNetworkRule.class);
        Assertions.assertEquals("qrvkdv", model.id());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        VirtualNetworkRule model = new VirtualNetworkRule().withId("qrvkdv");
        model = BinaryData.fromObject(model).toObject(VirtualNetworkRule.class);
        Assertions.assertEquals("qrvkdv", model.id());
    }
}
