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

package com.azure.resourcemanager.quota.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.quota.fluent.models.QuotaRequestDetailsInner;
import com.azure.resourcemanager.quota.models.QuotaRequestDetailsList;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class QuotaRequestDetailsListTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        QuotaRequestDetailsList model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"id\":\"qxhocdgeablgphut\",\"name\":\"ndv\",\"type\":\"ozwyiftyhxhuro\",\"properties\":{\"provisioningState\":\"Succeeded\",\"message\":\"olniwpwcukjf\",\"requestSubmitTime\":\"2021-02-25T16:13:04Z\",\"value\":[]}},{\"id\":\"klryplwck\",\"name\":\"syyp\",\"type\":\"dhsgcba\",\"properties\":{\"provisioningState\":\"InProgress\",\"message\":\"koty\",\"requestSubmitTime\":\"2021-02-05T05:14:14Z\",\"value\":[]}}],\"nextLink\":\"zndlikwy\"}")
                .toObject(QuotaRequestDetailsList.class);
        Assertions.assertEquals("zndlikwy", model.nextLink());
    }

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