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

package com.azure.resourcemanager.hdinsight.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.hdinsight.models.ApplicationGetHttpsEndpoint;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class ApplicationGetHttpsEndpointTests {
    @Test
    public void testDeserialize() {
        ApplicationGetHttpsEndpoint model =
            BinaryData
                .fromString(
                    "{\"accessModes\":[\"pzk\",\"mond\",\"mquxvypo\"],\"location\":\"kopkwhojvpajqgx\",\"destinationPort\":608982569,\"publicPort\":146904581,\"privateIPAddress\":\"bq\",\"subDomainSuffix\":\"vmkcx\",\"disableGatewayAuth\":true}")
                .toObject(ApplicationGetHttpsEndpoint.class);
        Assertions.assertEquals("pzk", model.accessModes().get(0));
        Assertions.assertEquals(608982569, model.destinationPort());
        Assertions.assertEquals("bq", model.privateIpAddress());
        Assertions.assertEquals("vmkcx", model.subDomainSuffix());
        Assertions.assertEquals(true, model.disableGatewayAuth());
    }

    @Test
    public void testSerialize() {
        ApplicationGetHttpsEndpoint model =
            new ApplicationGetHttpsEndpoint()
                .withAccessModes(Arrays.asList("pzk", "mond", "mquxvypo"))
                .withDestinationPort(608982569)
                .withPrivateIpAddress("bq")
                .withSubDomainSuffix("vmkcx")
                .withDisableGatewayAuth(true);
        model = BinaryData.fromObject(model).toObject(ApplicationGetHttpsEndpoint.class);
        Assertions.assertEquals("pzk", model.accessModes().get(0));
        Assertions.assertEquals(608982569, model.destinationPort());
        Assertions.assertEquals("bq", model.privateIpAddress());
        Assertions.assertEquals("vmkcx", model.subDomainSuffix());
        Assertions.assertEquals(true, model.disableGatewayAuth());
    }
}
