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

package com.azure.resourcemanager.mysqlflexibleserver.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.mysqlflexibleserver.fluent.models.BackupAndExportResponseProperties;
import org.junit.jupiter.api.Assertions;

public final class BackupAndExportResponsePropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        BackupAndExportResponseProperties model =
            BinaryData
                .fromString(
                    "{\"datasourceSizeInBytes\":4700894301237220319,\"dataTransferredInBytes\":1611067142281819203,\"backupMetadata\":\"hmsbzjhcrzevdp\"}")
                .toObject(BackupAndExportResponseProperties.class);
        Assertions.assertEquals(4700894301237220319L, model.datasourceSizeInBytes());
        Assertions.assertEquals(1611067142281819203L, model.dataTransferredInBytes());
        Assertions.assertEquals("hmsbzjhcrzevdp", model.backupMetadata());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        BackupAndExportResponseProperties model =
            new BackupAndExportResponseProperties()
                .withDatasourceSizeInBytes(4700894301237220319L)
                .withDataTransferredInBytes(1611067142281819203L)
                .withBackupMetadata("hmsbzjhcrzevdp");
        model = BinaryData.fromObject(model).toObject(BackupAndExportResponseProperties.class);
        Assertions.assertEquals(4700894301237220319L, model.datasourceSizeInBytes());
        Assertions.assertEquals(1611067142281819203L, model.dataTransferredInBytes());
        Assertions.assertEquals("hmsbzjhcrzevdp", model.backupMetadata());
    }
}
