// 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.fluent.models.WorkspacePatchProperties;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class WorkspacePatchPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        WorkspacePatchProperties model =
            BinaryData
                .fromString(
                    "{\"description\":\"izuckyfihrfidfvz\",\"friendlyName\":\"zuhtymwisdkfthwx\",\"applicationGroupReferences\":[\"eiwaopvkmi\"]}")
                .toObject(WorkspacePatchProperties.class);
        Assertions.assertEquals("izuckyfihrfidfvz", model.description());
        Assertions.assertEquals("zuhtymwisdkfthwx", model.friendlyName());
        Assertions.assertEquals("eiwaopvkmi", model.applicationGroupReferences().get(0));
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        WorkspacePatchProperties model =
            new WorkspacePatchProperties()
                .withDescription("izuckyfihrfidfvz")
                .withFriendlyName("zuhtymwisdkfthwx")
                .withApplicationGroupReferences(Arrays.asList("eiwaopvkmi"));
        model = BinaryData.fromObject(model).toObject(WorkspacePatchProperties.class);
        Assertions.assertEquals("izuckyfihrfidfvz", model.description());
        Assertions.assertEquals("zuhtymwisdkfthwx", model.friendlyName());
        Assertions.assertEquals("eiwaopvkmi", model.applicationGroupReferences().get(0));
    }
}
