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

package com.azure.resourcemanager.servicefabric.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.servicefabric.models.ApplicationTypeVersionsCleanupPolicy;
import org.junit.jupiter.api.Assertions;

public final class ApplicationTypeVersionsCleanupPolicyTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ApplicationTypeVersionsCleanupPolicy model =
            BinaryData
                .fromString("{\"maxUnusedVersionsToKeep\":5507217577010646686}")
                .toObject(ApplicationTypeVersionsCleanupPolicy.class);
        Assertions.assertEquals(5507217577010646686L, model.maxUnusedVersionsToKeep());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ApplicationTypeVersionsCleanupPolicy model =
            new ApplicationTypeVersionsCleanupPolicy().withMaxUnusedVersionsToKeep(5507217577010646686L);
        model = BinaryData.fromObject(model).toObject(ApplicationTypeVersionsCleanupPolicy.class);
        Assertions.assertEquals(5507217577010646686L, model.maxUnusedVersionsToKeep());
    }
}
