// 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.Nfs3Target;
import org.junit.jupiter.api.Assertions;

public final class Nfs3TargetTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        Nfs3Target model =
            BinaryData
                .fromString(
                    "{\"target\":\"syocogjltdtbnnha\",\"usageModel\":\"ocrkvcikh\",\"verificationTimer\":44638091,\"writeBackTimer\":703916773}")
                .toObject(Nfs3Target.class);
        Assertions.assertEquals("syocogjltdtbnnha", model.target());
        Assertions.assertEquals("ocrkvcikh", model.usageModel());
        Assertions.assertEquals(44638091, model.verificationTimer());
        Assertions.assertEquals(703916773, model.writeBackTimer());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        Nfs3Target model =
            new Nfs3Target()
                .withTarget("syocogjltdtbnnha")
                .withUsageModel("ocrkvcikh")
                .withVerificationTimer(44638091)
                .withWriteBackTimer(703916773);
        model = BinaryData.fromObject(model).toObject(Nfs3Target.class);
        Assertions.assertEquals("syocogjltdtbnnha", model.target());
        Assertions.assertEquals("ocrkvcikh", model.usageModel());
        Assertions.assertEquals(44638091, model.verificationTimer());
        Assertions.assertEquals(703916773, model.writeBackTimer());
    }
}
