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

package com.azure.resourcemanager.storagecache.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.storagecache.models.BlobNfsTarget;
import org.junit.jupiter.api.Assertions;

public final class BlobNfsTargetTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        BlobNfsTarget model =
            BinaryData
                .fromString(
                    "{\"target\":\"lmfmtdaay\",\"usageModel\":\"v\",\"verificationTimer\":1689077175,\"writeBackTimer\":772691250}")
                .toObject(BlobNfsTarget.class);
        Assertions.assertEquals("lmfmtdaay", model.target());
        Assertions.assertEquals("v", model.usageModel());
        Assertions.assertEquals(1689077175, model.verificationTimer());
        Assertions.assertEquals(772691250, model.writeBackTimer());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        BlobNfsTarget model =
            new BlobNfsTarget()
                .withTarget("lmfmtdaay")
                .withUsageModel("v")
                .withVerificationTimer(1689077175)
                .withWriteBackTimer(772691250);
        model = BinaryData.fromObject(model).toObject(BlobNfsTarget.class);
        Assertions.assertEquals("lmfmtdaay", model.target());
        Assertions.assertEquals("v", model.usageModel());
        Assertions.assertEquals(1689077175, model.verificationTimer());
        Assertions.assertEquals(772691250, model.writeBackTimer());
    }
}
