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

package com.azure.resourcemanager.hybridcontainerservice.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.hybridcontainerservice.models.HttpProxyConfigResponse;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class HttpProxyConfigResponseTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        HttpProxyConfigResponse model =
            BinaryData
                .fromString(
                    "{\"httpProxy\":\"sabkyqduujitcjcz\",\"httpsProxy\":\"evndh\",\"noProxy\":[\"pdappds\",\"dkvwrwjfe\",\"snhu\"],\"trustedCa\":\"eltmrldhugjzzdat\",\"username\":\"hocdgeab\"}")
                .toObject(HttpProxyConfigResponse.class);
        Assertions.assertEquals("sabkyqduujitcjcz", model.httpProxy());
        Assertions.assertEquals("evndh", model.httpsProxy());
        Assertions.assertEquals("pdappds", model.noProxy().get(0));
        Assertions.assertEquals("eltmrldhugjzzdat", model.trustedCa());
        Assertions.assertEquals("hocdgeab", model.username());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        HttpProxyConfigResponse model =
            new HttpProxyConfigResponse()
                .withHttpProxy("sabkyqduujitcjcz")
                .withHttpsProxy("evndh")
                .withNoProxy(Arrays.asList("pdappds", "dkvwrwjfe", "snhu"))
                .withTrustedCa("eltmrldhugjzzdat")
                .withUsername("hocdgeab");
        model = BinaryData.fromObject(model).toObject(HttpProxyConfigResponse.class);
        Assertions.assertEquals("sabkyqduujitcjcz", model.httpProxy());
        Assertions.assertEquals("evndh", model.httpsProxy());
        Assertions.assertEquals("pdappds", model.noProxy().get(0));
        Assertions.assertEquals("eltmrldhugjzzdat", model.trustedCa());
        Assertions.assertEquals("hocdgeab", model.username());
    }
}
