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

package com.azure.resourcemanager.hanaonazure.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.hanaonazure.fluent.models.OperationInner;
import com.azure.resourcemanager.hanaonazure.models.Display;
import com.azure.resourcemanager.hanaonazure.models.OperationList;
import java.util.Arrays;

public final class OperationListTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        OperationList model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"name\":\"quvgjxpybczme\",\"display\":{\"provider\":\"zopbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\",\"origin\":\"ownoizhw\"},\"isDataAction\":true},{\"name\":\"bqsoqijg\",\"display\":{\"provider\":\"bpazlobcufpdzn\",\"resource\":\"t\",\"operation\":\"qjnqglhqgnufoooj\",\"description\":\"ifsqesaagdfmg\",\"origin\":\"lhjxr\"},\"isDataAction\":false},{\"name\":\"mrvktsizntoc\",\"display\":{\"provider\":\"ouajpsqucmpoyf\",\"resource\":\"fogknygjofjdde\",\"operation\":\"rd\",\"description\":\"pewnw\",\"origin\":\"itjz\"},\"isDataAction\":false}]}")
                .toObject(OperationList.class);
    }

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