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

package com.azure.resourcemanager.mediaservices.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.mediaservices.models.Audio;
import org.junit.jupiter.api.Assertions;

public final class AudioTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        Audio model =
            BinaryData
                .fromString(
                    "{\"@odata.type\":\"#Microsoft.Media.Audio\",\"channels\":1521698279,\"samplingRate\":181907688,\"bitrate\":1490007773,\"label\":\"isze\"}")
                .toObject(Audio.class);
        Assertions.assertEquals("isze", model.label());
        Assertions.assertEquals(1521698279, model.channels());
        Assertions.assertEquals(181907688, model.samplingRate());
        Assertions.assertEquals(1490007773, model.bitrate());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        Audio model =
            new Audio().withLabel("isze").withChannels(1521698279).withSamplingRate(181907688).withBitrate(1490007773);
        model = BinaryData.fromObject(model).toObject(Audio.class);
        Assertions.assertEquals("isze", model.label());
        Assertions.assertEquals(1521698279, model.channels());
        Assertions.assertEquals(181907688, model.samplingRate());
        Assertions.assertEquals(1490007773, model.bitrate());
    }
}
