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

package com.azure.resourcemanager.appcontainers.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.appcontainers.models.Nonce;
import org.junit.jupiter.api.Assertions;

public final class NonceTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        Nonce model =
            BinaryData
                .fromString("{\"validateNonce\":false,\"nonceExpirationInterval\":\"ljavbqid\"}")
                .toObject(Nonce.class);
        Assertions.assertEquals(false, model.validateNonce());
        Assertions.assertEquals("ljavbqid", model.nonceExpirationInterval());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        Nonce model = new Nonce().withValidateNonce(false).withNonceExpirationInterval("ljavbqid");
        model = BinaryData.fromObject(model).toObject(Nonce.class);
        Assertions.assertEquals(false, model.validateNonce());
        Assertions.assertEquals("ljavbqid", model.nonceExpirationInterval());
    }
}
