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

package com.azure.resourcemanager.security.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.security.models.AtaSolutionProperties;
import com.azure.resourcemanager.security.models.ConnectedWorkspace;
import org.junit.jupiter.api.Assertions;

public final class AtaSolutionPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AtaSolutionProperties model =
            BinaryData
                .fromString(
                    "{\"lastEventReceived\":\"fohyk\",\"deviceVendor\":\"xbbcbrw\",\"deviceType\":\"u\",\"workspace\":{\"id\":\"jizbeew\"},\"\":{\"juyrsrziuctixg\":\"datamrvz\",\"uifr\":\"datad\"}}")
                .toObject(AtaSolutionProperties.class);
        Assertions.assertEquals("xbbcbrw", model.deviceVendor());
        Assertions.assertEquals("u", model.deviceType());
        Assertions.assertEquals("jizbeew", model.workspace().id());
        Assertions.assertEquals("fohyk", model.lastEventReceived());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AtaSolutionProperties model =
            new AtaSolutionProperties()
                .withDeviceVendor("xbbcbrw")
                .withDeviceType("u")
                .withWorkspace(new ConnectedWorkspace().withId("jizbeew"))
                .withLastEventReceived("fohyk");
        model = BinaryData.fromObject(model).toObject(AtaSolutionProperties.class);
        Assertions.assertEquals("xbbcbrw", model.deviceVendor());
        Assertions.assertEquals("u", model.deviceType());
        Assertions.assertEquals("jizbeew", model.workspace().id());
        Assertions.assertEquals("fohyk", model.lastEventReceived());
    }
}
