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

package com.azure.resourcemanager.logic.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.logic.models.KeyVaultKeyAttributes;
import org.junit.jupiter.api.Assertions;

public final class KeyVaultKeyAttributesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        KeyVaultKeyAttributes model =
            BinaryData
                .fromString("{\"enabled\":false,\"created\":6834076343128735710,\"updated\":652867049720214090}")
                .toObject(KeyVaultKeyAttributes.class);
        Assertions.assertEquals(false, model.enabled());
        Assertions.assertEquals(6834076343128735710L, model.created());
        Assertions.assertEquals(652867049720214090L, model.updated());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        KeyVaultKeyAttributes model =
            new KeyVaultKeyAttributes()
                .withEnabled(false)
                .withCreated(6834076343128735710L)
                .withUpdated(652867049720214090L);
        model = BinaryData.fromObject(model).toObject(KeyVaultKeyAttributes.class);
        Assertions.assertEquals(false, model.enabled());
        Assertions.assertEquals(6834076343128735710L, model.created());
        Assertions.assertEquals(652867049720214090L, model.updated());
    }
}
