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

package com.azure.resourcemanager.hdinsight.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.hdinsight.models.AaddsResourceDetails;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class AaddsResourceDetailsTests {
    @Test
    public void testDeserialize() {
        AaddsResourceDetails model =
            BinaryData
                .fromString(
                    "{\"domainName\":\"cizsjqlhkrribdei\",\"initialSyncComplete\":true,\"ldapsEnabled\":false,\"ldapsPublicCertificateInBase64\":\"ghvxndzwmkrefa\",\"resourceId\":\"jorwkqnyhgbij\",\"subnetId\":\"ivfxzsjabibsyst\",\"tenantId\":\"fsdjpvkvp\"}")
                .toObject(AaddsResourceDetails.class);
        Assertions.assertEquals("cizsjqlhkrribdei", model.domainName());
        Assertions.assertEquals(true, model.initialSyncComplete());
        Assertions.assertEquals(false, model.ldapsEnabled());
        Assertions.assertEquals("ghvxndzwmkrefa", model.ldapsPublicCertificateInBase64());
        Assertions.assertEquals("jorwkqnyhgbij", model.resourceId());
        Assertions.assertEquals("ivfxzsjabibsyst", model.subnetId());
        Assertions.assertEquals("fsdjpvkvp", model.tenantId());
    }

    @Test
    public void testSerialize() {
        AaddsResourceDetails model =
            new AaddsResourceDetails()
                .withDomainName("cizsjqlhkrribdei")
                .withInitialSyncComplete(true)
                .withLdapsEnabled(false)
                .withLdapsPublicCertificateInBase64("ghvxndzwmkrefa")
                .withResourceId("jorwkqnyhgbij")
                .withSubnetId("ivfxzsjabibsyst")
                .withTenantId("fsdjpvkvp");
        model = BinaryData.fromObject(model).toObject(AaddsResourceDetails.class);
        Assertions.assertEquals("cizsjqlhkrribdei", model.domainName());
        Assertions.assertEquals(true, model.initialSyncComplete());
        Assertions.assertEquals(false, model.ldapsEnabled());
        Assertions.assertEquals("ghvxndzwmkrefa", model.ldapsPublicCertificateInBase64());
        Assertions.assertEquals("jorwkqnyhgbij", model.resourceId());
        Assertions.assertEquals("ivfxzsjabibsyst", model.subnetId());
        Assertions.assertEquals("fsdjpvkvp", model.tenantId());
    }
}
