// 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.ReplicaCollectionInner;
import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner;
import java.util.Arrays;

public final class ReplicaCollectionInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ReplicaCollectionInner model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"properties\":{\"createdTime\":\"2021-08-22T14:57:30Z\",\"containers\":[]},\"id\":\"yxcdyuibhmfdnbzy\",\"name\":\"vfvfcj\",\"type\":\"aeoisrvh\"},{\"properties\":{\"createdTime\":\"2021-04-23T05:38:58Z\",\"containers\":[]},\"id\":\"ukiscvwmzhw\",\"name\":\"lefaxvxilcbtgn\",\"type\":\"nzeyqxtjj\"},{\"properties\":{\"createdTime\":\"2021-06-09T05:30:24Z\",\"containers\":[]},\"id\":\"ycavodggxdbees\",\"name\":\"ieknl\",\"type\":\"ariaawi\"}]}")
                .toObject(ReplicaCollectionInner.class);
    }

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