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

package com.azure.resourcemanager.cognitiveservices.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.cognitiveservices.models.DeploymentListResult;
import org.junit.jupiter.api.Assertions;

public final class DeploymentListResultTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        DeploymentListResult model =
            BinaryData
                .fromString(
                    "{\"nextLink\":\"qxn\",\"value\":[{\"etag\":\"xhuri\",\"properties\":{\"provisioningState\":\"Moving\",\"capabilities\":{},\"raiPolicyName\":\"nkbebxmuby\"},\"id\":\"twlrbqt\",\"name\":\"oievseotgqrlltm\",\"type\":\"wlauwzizxbmpg\"},{\"etag\":\"fuzmuvpbtt\",\"properties\":{\"provisioningState\":\"Accepted\",\"capabilities\":{},\"raiPolicyName\":\"ebmnzbtbhjpglk\"},\"id\":\"ohdneuel\",\"name\":\"phsdyhto\",\"type\":\"fikdowwqu\"},{\"etag\":\"zx\",\"properties\":{\"provisioningState\":\"Succeeded\",\"capabilities\":{},\"raiPolicyName\":\"zonosgg\"},\"id\":\"c\",\"name\":\"hfwdsjnkaljutiis\",\"type\":\"acffgdkzzewkfvhq\"}]}")
                .toObject(DeploymentListResult.class);
        Assertions.assertEquals("qxn", model.nextLink());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        DeploymentListResult model = new DeploymentListResult().withNextLink("qxn");
        model = BinaryData.fromObject(model).toObject(DeploymentListResult.class);
        Assertions.assertEquals("qxn", model.nextLink());
    }
}
