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

public final class IoTSeverityMetricsTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        IoTSeverityMetrics model =
            BinaryData
                .fromString("{\"high\":9028045602986691631,\"medium\":2874780118088744582,\"low\":9144697658006681867}")
                .toObject(IoTSeverityMetrics.class);
        Assertions.assertEquals(9028045602986691631L, model.high());
        Assertions.assertEquals(2874780118088744582L, model.medium());
        Assertions.assertEquals(9144697658006681867L, model.low());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        IoTSeverityMetrics model =
            new IoTSeverityMetrics()
                .withHigh(9028045602986691631L)
                .withMedium(2874780118088744582L)
                .withLow(9144697658006681867L);
        model = BinaryData.fromObject(model).toObject(IoTSeverityMetrics.class);
        Assertions.assertEquals(9028045602986691631L, model.high());
        Assertions.assertEquals(2874780118088744582L, model.medium());
        Assertions.assertEquals(9144697658006681867L, model.low());
    }
}
