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

package com.azure.resourcemanager.containerservicefleet.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.containerservicefleet.fluent.models.UpdateRunInner;
import com.azure.resourcemanager.containerservicefleet.models.UpdateRunListResult;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class UpdateRunListResultTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        UpdateRunListResult model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\"},\"eTag\":\"ndlik\",\"id\":\"qkgfgibma\",\"name\":\"gakeqsr\",\"type\":\"yb\"},{\"properties\":{\"provisioningState\":\"Canceled\"},\"eTag\":\"tbciqfouflmm\",\"id\":\"zsm\",\"name\":\"dmgloug\",\"type\":\"b\"},{\"properties\":{\"provisioningState\":\"Failed\"},\"eTag\":\"uqktap\",\"id\":\"wgcu\",\"name\":\"rtumkdosvq\",\"type\":\"hbmdgbbjfdd\"}],\"nextLink\":\"bmbexppbhtqqro\"}")
                .toObject(UpdateRunListResult.class);
        Assertions.assertEquals("bmbexppbhtqqro", model.nextLink());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        UpdateRunListResult model =
            new UpdateRunListResult()
                .withValue(Arrays.asList(new UpdateRunInner(), new UpdateRunInner(), new UpdateRunInner()))
                .withNextLink("bmbexppbhtqqro");
        model = BinaryData.fromObject(model).toObject(UpdateRunListResult.class);
        Assertions.assertEquals("bmbexppbhtqqro", model.nextLink());
    }
}
