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

public final class LiveEventTrackStatusTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        LiveEventTrackStatus model =
            BinaryData
                .fromString(
                    "{\"trackId\":\"emmsbvdkc\",\"expectedBitrate\":7520814175527632507,\"incomingBitrate\":7476370599880379744,\"ingestDrift\":\"wj\",\"requestReceived\":1179971098107474850,\"requestSucceeded\":9167541690912774024}")
                .toObject(LiveEventTrackStatus.class);
        Assertions.assertEquals("emmsbvdkc", model.trackId());
        Assertions.assertEquals(7520814175527632507L, model.expectedBitrate());
        Assertions.assertEquals(7476370599880379744L, model.incomingBitrate());
        Assertions.assertEquals("wj", model.ingestDrift());
        Assertions.assertEquals(1179971098107474850L, model.requestReceived());
        Assertions.assertEquals(9167541690912774024L, model.requestSucceeded());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        LiveEventTrackStatus model =
            new LiveEventTrackStatus()
                .withTrackId("emmsbvdkc")
                .withExpectedBitrate(7520814175527632507L)
                .withIncomingBitrate(7476370599880379744L)
                .withIngestDrift("wj")
                .withRequestReceived(1179971098107474850L)
                .withRequestSucceeded(9167541690912774024L);
        model = BinaryData.fromObject(model).toObject(LiveEventTrackStatus.class);
        Assertions.assertEquals("emmsbvdkc", model.trackId());
        Assertions.assertEquals(7520814175527632507L, model.expectedBitrate());
        Assertions.assertEquals(7476370599880379744L, model.incomingBitrate());
        Assertions.assertEquals("wj", model.ingestDrift());
        Assertions.assertEquals(1179971098107474850L, model.requestReceived());
        Assertions.assertEquals(9167541690912774024L, model.requestSucceeded());
    }
}
