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

package com.azure.resourcemanager.iothub.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.iothub.models.RootCertificateProperties;
import org.junit.jupiter.api.Assertions;

public final class RootCertificatePropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        RootCertificateProperties model =
            BinaryData
                .fromString("{\"enableRootCertificateV2\":false,\"lastUpdatedTimeUtc\":\"2021-01-10T16:47:02Z\"}")
                .toObject(RootCertificateProperties.class);
        Assertions.assertEquals(false, model.enableRootCertificateV2());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        RootCertificateProperties model = new RootCertificateProperties().withEnableRootCertificateV2(false);
        model = BinaryData.fromObject(model).toObject(RootCertificateProperties.class);
        Assertions.assertEquals(false, model.enableRootCertificateV2());
    }
}
