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

package com.azure.resourcemanager.appcontainers.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner;
import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner;
import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorageProperties;
import java.util.Arrays;

public final class ConnectedEnvironmentStoragesCollectionInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ConnectedEnvironmentStoragesCollectionInner model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"properties\":{},\"id\":\"jn\",\"name\":\"bckhsmtxpsi\",\"type\":\"btfhvpesaps\"},{\"properties\":{},\"id\":\"mhjjdhtldwkyzx\",\"name\":\"utknc\",\"type\":\"scwsv\"},{\"properties\":{},\"id\":\"ogtwrupqsxvnmi\",\"name\":\"ykvceoveil\",\"type\":\"vnotyfjfcnj\"}]}")
                .toObject(ConnectedEnvironmentStoragesCollectionInner.class);
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ConnectedEnvironmentStoragesCollectionInner model =
            new ConnectedEnvironmentStoragesCollectionInner()
                .withValue(
                    Arrays
                        .asList(
                            new ConnectedEnvironmentStorageInner()
                                .withProperties(new ConnectedEnvironmentStorageProperties()),
                            new ConnectedEnvironmentStorageInner()
                                .withProperties(new ConnectedEnvironmentStorageProperties()),
                            new ConnectedEnvironmentStorageInner()
                                .withProperties(new ConnectedEnvironmentStorageProperties())));
        model = BinaryData.fromObject(model).toObject(ConnectedEnvironmentStoragesCollectionInner.class);
    }
}
