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

package com.azure.resourcemanager.dataprotection.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.dataprotection.fluent.models.DppBaseResourceInner;
import com.azure.resourcemanager.dataprotection.models.DppBaseResourceList;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class DppBaseResourceListTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        DppBaseResourceList model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"id\":\"jfqka\",\"name\":\"wiipfpub\",\"type\":\"bwwift\"},{\"id\":\"qkvpuvksgplsakn\",\"name\":\"fsynljphuop\",\"type\":\"dlqiyntorzih\"}],\"nextLink\":\"osjswsr\"}")
                .toObject(DppBaseResourceList.class);
        Assertions.assertEquals("osjswsr", model.nextLink());
    }

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