// 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.models.WorkloadNetworkDhcpEntity;
import org.junit.jupiter.api.Assertions;

public final class WorkloadNetworkDhcpEntityTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        WorkloadNetworkDhcpEntity model =
            BinaryData
                .fromString(
                    "{\"dhcpType\":\"WorkloadNetworkDhcpEntity\",\"displayName\":\"exrmcqibycnojvk\",\"segments\":[\"fqsgzvahapjy\"],\"provisioningState\":\"Failed\",\"revision\":6168011718713142792}")
                .toObject(WorkloadNetworkDhcpEntity.class);
        Assertions.assertEquals("exrmcqibycnojvk", model.displayName());
        Assertions.assertEquals(6168011718713142792L, model.revision());
    }

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