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

package com.azure.resourcemanager.avs.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkDhcpInner;
import com.azure.resourcemanager.avs.models.WorkloadNetworkDhcpEntity;
import org.junit.jupiter.api.Assertions;

public final class WorkloadNetworkDhcpInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        WorkloadNetworkDhcpInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"jhfjxwm\",\"segments\":[\"kfoqreyfkzikfj\",\"wneaiv\"],\"provisioningState\":\"Building\",\"revision\":8376736309034828237},\"id\":\"pcirelsfeaen\",\"name\":\"abfatkl\",\"type\":\"dxbjhwuaanozj\"}")
                .toObject(WorkloadNetworkDhcpInner.class);
        Assertions.assertEquals("jhfjxwm", model.properties().displayName());
        Assertions.assertEquals(8376736309034828237L, model.properties().revision());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        WorkloadNetworkDhcpInner model =
            new WorkloadNetworkDhcpInner()
                .withProperties(
                    new WorkloadNetworkDhcpEntity().withDisplayName("jhfjxwm").withRevision(8376736309034828237L));
        model = BinaryData.fromObject(model).toObject(WorkloadNetworkDhcpInner.class);
        Assertions.assertEquals("jhfjxwm", model.properties().displayName());
        Assertions.assertEquals(8376736309034828237L, model.properties().revision());
    }
}
