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

package com.azure.resourcemanager.frontdoor.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.frontdoor.models.LoadBalancingSettingsUpdateParameters;
import org.junit.jupiter.api.Assertions;

public final class LoadBalancingSettingsUpdateParametersTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        LoadBalancingSettingsUpdateParameters model =
            BinaryData
                .fromString(
                    "{\"sampleSize\":1092081926,\"successfulSamplesRequired\":2033787842,\"additionalLatencyMilliseconds\":294736838}")
                .toObject(LoadBalancingSettingsUpdateParameters.class);
        Assertions.assertEquals(1092081926, model.sampleSize());
        Assertions.assertEquals(2033787842, model.successfulSamplesRequired());
        Assertions.assertEquals(294736838, model.additionalLatencyMilliseconds());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        LoadBalancingSettingsUpdateParameters model =
            new LoadBalancingSettingsUpdateParameters()
                .withSampleSize(1092081926)
                .withSuccessfulSamplesRequired(2033787842)
                .withAdditionalLatencyMilliseconds(294736838);
        model = BinaryData.fromObject(model).toObject(LoadBalancingSettingsUpdateParameters.class);
        Assertions.assertEquals(1092081926, model.sampleSize());
        Assertions.assertEquals(2033787842, model.successfulSamplesRequired());
        Assertions.assertEquals(294736838, model.additionalLatencyMilliseconds());
    }
}
