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

package com.azure.resourcemanager.managednetworkfabric.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkDevicePatchParametersProperties;
import org.junit.jupiter.api.Assertions;

public final class NetworkDevicePatchParametersPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        NetworkDevicePatchParametersProperties model =
            BinaryData
                .fromString(
                    "{\"hostName\":\"qjlihhyuspska\",\"serialNumber\":\"vlmfwdgzxulucv\",\"annotation\":\"mrsreuzvxurisjnh\"}")
                .toObject(NetworkDevicePatchParametersProperties.class);
        Assertions.assertEquals("mrsreuzvxurisjnh", model.annotation());
        Assertions.assertEquals("qjlihhyuspska", model.hostname());
        Assertions.assertEquals("vlmfwdgzxulucv", model.serialNumber());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        NetworkDevicePatchParametersProperties model =
            new NetworkDevicePatchParametersProperties()
                .withAnnotation("mrsreuzvxurisjnh")
                .withHostname("qjlihhyuspska")
                .withSerialNumber("vlmfwdgzxulucv");
        model = BinaryData.fromObject(model).toObject(NetworkDevicePatchParametersProperties.class);
        Assertions.assertEquals("mrsreuzvxurisjnh", model.annotation());
        Assertions.assertEquals("qjlihhyuspska", model.hostname());
        Assertions.assertEquals("vlmfwdgzxulucv", model.serialNumber());
    }
}
