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

package com.azure.resourcemanager.datamigration.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.datamigration.fluent.models.ResourceSkuInner;
import com.azure.resourcemanager.datamigration.models.ResourceSkusResult;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class ResourceSkusResultTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ResourceSkusResult model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"resourceType\":\"hq\",\"name\":\"gjxpybczmehmt\",\"tier\":\"pbsphrupidgs\",\"size\":\"bejhphoycmsxa\",\"family\":\"hdxbmtqio\",\"kind\":\"zehtbmu\",\"capacity\":{\"minimum\":3820758072084544948,\"maximum\":8327116353755681412,\"default\":6774757655380021000,\"scaleType\":\"None\"},\"locations\":[\"qsoqijgkd\",\"bpazlobcufpdzn\"],\"apiVersions\":[\"cqqjnqglhqgn\"],\"costs\":[],\"capabilities\":[],\"restrictions\":[]},{\"resourceType\":\"ifsqesaagdfmg\",\"name\":\"lhjxr\",\"tier\":\"kwm\",\"size\":\"ktsizntocipaou\",\"family\":\"psqucmpoyf\",\"kind\":\"fogknygjofjdde\",\"capacity\":{\"minimum\":3233201824029317370,\"maximum\":5108694483378094778,\"default\":3126472069683298647,\"scaleType\":\"None\"},\"locations\":[\"jzyflu\",\"arhmofcqhsmy\"],\"apiVersions\":[\"dtmlxhekuksjt\",\"ukcdmparcryuanzw\",\"xzdxtayrlhmwh\"],\"costs\":[],\"capabilities\":[],\"restrictions\":[]},{\"resourceType\":\"tu\",\"name\":\"nryrtihf\",\"tier\":\"ijbpzvgnwzsymgl\",\"size\":\"fcyzkohdbihanufh\",\"family\":\"bj\",\"kind\":\"a\",\"capacity\":{\"minimum\":3872828993572496583,\"maximum\":3143414343495446115,\"default\":3270115267401953205,\"scaleType\":\"Automatic\"},\"locations\":[\"wczbys\",\"npqxuh\",\"vyq\"],\"apiVersions\":[\"b\"],\"costs\":[],\"capabilities\":[],\"restrictions\":[]}],\"nextLink\":\"mjgr\"}")
                .toObject(ResourceSkusResult.class);
        Assertions.assertEquals("mjgr", model.nextLink());
    }

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