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

package com.azure.resourcemanager.vmwarecloudsimple.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.vmwarecloudsimple.fluent.models.DedicatedCloudNodeProperties;
import java.util.UUID;
import org.junit.jupiter.api.Assertions;

public final class DedicatedCloudNodePropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        DedicatedCloudNodeProperties model =
            BinaryData
                .fromString(
                    "{\"availabilityZoneId\":\"uj\",\"availabilityZoneName\":\"uhmuouqfprwzwbn\",\"cloudRackName\":\"itnwuizgazxufi\",\"created\":\"2021-07-05T04:35:30Z\",\"nodesCount\":935270600,\"placementGroupId\":\"y\",\"placementGroupName\":\"hr\",\"privateCloudId\":\"dfvzwdzuhty\",\"privateCloudName\":\"isdkfthwxmnteiw\",\"provisioningState\":\"pvkmijcmmxdcuf\",\"purchaseId\":\"78f2fb59-9812-43da-a2c4-0832caf017de\",\"skuDescription\":{\"id\":\"srp\",\"name\":\"mzidnsezcxtb\"},\"status\":\"unused\",\"vmwareClusterName\":\"yc\"}")
                .toObject(DedicatedCloudNodeProperties.class);
        Assertions.assertEquals("uj", model.availabilityZoneId());
        Assertions.assertEquals(935270600, model.nodesCount());
        Assertions.assertEquals("y", model.placementGroupId());
        Assertions.assertEquals(UUID.fromString("78f2fb59-9812-43da-a2c4-0832caf017de"), model.purchaseId());
        Assertions.assertEquals("srp", model.id());
        Assertions.assertEquals("mzidnsezcxtb", model.name());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        DedicatedCloudNodeProperties model =
            new DedicatedCloudNodeProperties()
                .withAvailabilityZoneId("uj")
                .withNodesCount(935270600)
                .withPlacementGroupId("y")
                .withPurchaseId(UUID.fromString("78f2fb59-9812-43da-a2c4-0832caf017de"))
                .withId("srp")
                .withName("mzidnsezcxtb");
        model = BinaryData.fromObject(model).toObject(DedicatedCloudNodeProperties.class);
        Assertions.assertEquals("uj", model.availabilityZoneId());
        Assertions.assertEquals(935270600, model.nodesCount());
        Assertions.assertEquals("y", model.placementGroupId());
        Assertions.assertEquals(UUID.fromString("78f2fb59-9812-43da-a2c4-0832caf017de"), model.purchaseId());
        Assertions.assertEquals("srp", model.id());
        Assertions.assertEquals("mzidnsezcxtb", model.name());
    }
}
