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

package com.azure.resourcemanager.networkcloud.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.networkcloud.fluent.models.KubernetesClusterPatchProperties;
import com.azure.resourcemanager.networkcloud.models.ControlPlaneNodePatchConfiguration;
import org.junit.jupiter.api.Assertions;

public final class KubernetesClusterPatchPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        KubernetesClusterPatchProperties model =
            BinaryData
                .fromString(
                    "{\"controlPlaneNodeConfiguration\":{\"count\":7156097712608977310},\"kubernetesVersion\":\"xkjzwrgxffm\"}")
                .toObject(KubernetesClusterPatchProperties.class);
        Assertions.assertEquals(7156097712608977310L, model.controlPlaneNodeConfiguration().count());
        Assertions.assertEquals("xkjzwrgxffm", model.kubernetesVersion());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        KubernetesClusterPatchProperties model =
            new KubernetesClusterPatchProperties()
                .withControlPlaneNodeConfiguration(
                    new ControlPlaneNodePatchConfiguration().withCount(7156097712608977310L))
                .withKubernetesVersion("xkjzwrgxffm");
        model = BinaryData.fromObject(model).toObject(KubernetesClusterPatchProperties.class);
        Assertions.assertEquals(7156097712608977310L, model.controlPlaneNodeConfiguration().count());
        Assertions.assertEquals("xkjzwrgxffm", model.kubernetesVersion());
    }
}
