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

public final class LoadBalancingSettingsPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        LoadBalancingSettingsProperties model =
            BinaryData
                .fromString(
                    "{\"resourceState\":\"Enabling\",\"sampleSize\":412409909,\"successfulSamplesRequired\":1627840881,\"additionalLatencyMilliseconds\":1448466618}")
                .toObject(LoadBalancingSettingsProperties.class);
        Assertions.assertEquals(412409909, model.sampleSize());
        Assertions.assertEquals(1627840881, model.successfulSamplesRequired());
        Assertions.assertEquals(1448466618, model.additionalLatencyMilliseconds());
    }

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