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

package com.azure.resourcemanager.machinelearning.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.machinelearning.models.CosmosDbSettings;
import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings;
import org.junit.jupiter.api.Assertions;

public final class ServiceManagedResourcesSettingsTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ServiceManagedResourcesSettings model =
            BinaryData
                .fromString("{\"cosmosDb\":{\"collectionsThroughput\":775754231}}")
                .toObject(ServiceManagedResourcesSettings.class);
        Assertions.assertEquals(775754231, model.cosmosDb().collectionsThroughput());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ServiceManagedResourcesSettings model =
            new ServiceManagedResourcesSettings()
                .withCosmosDb(new CosmosDbSettings().withCollectionsThroughput(775754231));
        model = BinaryData.fromObject(model).toObject(ServiceManagedResourcesSettings.class);
        Assertions.assertEquals(775754231, model.cosmosDb().collectionsThroughput());
    }
}
