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

package com.azure.resourcemanager.desktopvirtualization.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.desktopvirtualization.models.LogSpecification;
import org.junit.jupiter.api.Assertions;

public final class LogSpecificationTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        LogSpecification model =
            BinaryData
                .fromString(
                    "{\"name\":\"wmfdatscmdvpjhul\",\"displayName\":\"uvm\",\"blobDuration\":\"ozkrwfndiodjpslw\"}")
                .toObject(LogSpecification.class);
        Assertions.assertEquals("wmfdatscmdvpjhul", model.name());
        Assertions.assertEquals("uvm", model.displayName());
        Assertions.assertEquals("ozkrwfndiodjpslw", model.blobDuration());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        LogSpecification model =
            new LogSpecification()
                .withName("wmfdatscmdvpjhul")
                .withDisplayName("uvm")
                .withBlobDuration("ozkrwfndiodjpslw");
        model = BinaryData.fromObject(model).toObject(LogSpecification.class);
        Assertions.assertEquals("wmfdatscmdvpjhul", model.name());
        Assertions.assertEquals("uvm", model.displayName());
        Assertions.assertEquals("ozkrwfndiodjpslw", model.blobDuration());
    }
}
