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

package com.azure.resourcemanager.kusto.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.kusto.fluent.models.OutboundNetworkDependenciesEndpointInner;
import com.azure.resourcemanager.kusto.models.OutboundNetworkDependenciesEndpointListResult;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class OutboundNetworkDependenciesEndpointListResultTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        OutboundNetworkDependenciesEndpointListResult model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"properties\":{\"category\":\"ohfwds\",\"endpoints\":[],\"provisioningState\":\"Canceled\"},\"etag\":\"jutiiswacff\",\"id\":\"dkzzewkfvhqcrail\",\"name\":\"pnppfuf\",\"type\":\"rwdmhdlxyjrxsa\"}],\"nextLink\":\"fcnihgwq\"}")
                .toObject(OutboundNetworkDependenciesEndpointListResult.class);
        Assertions.assertEquals("ohfwds", model.value().get(0).category());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        OutboundNetworkDependenciesEndpointListResult model =
            new OutboundNetworkDependenciesEndpointListResult()
                .withValue(
                    Arrays
                        .asList(
                            new OutboundNetworkDependenciesEndpointInner()
                                .withCategory("ohfwds")
                                .withEndpoints(Arrays.asList())));
        model = BinaryData.fromObject(model).toObject(OutboundNetworkDependenciesEndpointListResult.class);
        Assertions.assertEquals("ohfwds", model.value().get(0).category());
    }
}
