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

package com.azure.resourcemanager.devspaces.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.devspaces.fluent.models.ControllerConnectionDetailsListInner;
import com.azure.resourcemanager.devspaces.models.ControllerConnectionDetails;
import com.azure.resourcemanager.devspaces.models.OrchestratorSpecificConnectionDetails;
import java.util.Arrays;

public final class ControllerConnectionDetailsListInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ControllerConnectionDetailsListInner model =
            BinaryData
                .fromString(
                    "{\"connectionDetailsList\":[{\"orchestratorSpecificConnectionDetails\":{\"instanceType\":\"OrchestratorSpecificConnectionDetails\"}},{\"orchestratorSpecificConnectionDetails\":{\"instanceType\":\"OrchestratorSpecificConnectionDetails\"}}]}")
                .toObject(ControllerConnectionDetailsListInner.class);
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ControllerConnectionDetailsListInner model =
            new ControllerConnectionDetailsListInner()
                .withConnectionDetailsList(
                    Arrays
                        .asList(
                            new ControllerConnectionDetails()
                                .withOrchestratorSpecificConnectionDetails(new OrchestratorSpecificConnectionDetails()),
                            new ControllerConnectionDetails()
                                .withOrchestratorSpecificConnectionDetails(
                                    new OrchestratorSpecificConnectionDetails())));
        model = BinaryData.fromObject(model).toObject(ControllerConnectionDetailsListInner.class);
    }
}
