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

package com.azure.resourcemanager.hybridkubernetes.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.hybridkubernetes.models.AuthenticationMethod;
import com.azure.resourcemanager.hybridkubernetes.models.ListClusterUserCredentialProperties;
import org.junit.jupiter.api.Assertions;

public final class ListClusterUserCredentialPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ListClusterUserCredentialProperties model =
            BinaryData
                .fromString("{\"authenticationMethod\":\"Token\",\"clientProxy\":false}")
                .toObject(ListClusterUserCredentialProperties.class);
        Assertions.assertEquals(AuthenticationMethod.TOKEN, model.authenticationMethod());
        Assertions.assertEquals(false, model.clientProxy());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ListClusterUserCredentialProperties model =
            new ListClusterUserCredentialProperties()
                .withAuthenticationMethod(AuthenticationMethod.TOKEN)
                .withClientProxy(false);
        model = BinaryData.fromObject(model).toObject(ListClusterUserCredentialProperties.class);
        Assertions.assertEquals(AuthenticationMethod.TOKEN, model.authenticationMethod());
        Assertions.assertEquals(false, model.clientProxy());
    }
}
