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

package com.azure.resourcemanager.appcomplianceautomation.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.appcomplianceautomation.models.SnapshotResourceList;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class SnapshotResourceListTests {
    @Test
    public void testDeserialize() {
        SnapshotResourceList model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"properties\":{\"id\":\"ckyfih\",\"snapshotName\":\"idf\",\"createdAt\":\"2021-05-02T03:10:17Z\",\"provisioningState\":\"Updating\",\"complianceResults\":[]},\"id\":\"mwisdkfthwxmnt\",\"name\":\"i\",\"type\":\"aop\"},{\"properties\":{\"id\":\"ijcmmx\",\"snapshotName\":\"ufufsrp\",\"createdAt\":\"2021-06-29T04:41:21Z\",\"provisioningState\":\"Failed\",\"complianceResults\":[]},\"id\":\"xtbzsgfyccsne\",\"name\":\"mdwzjeiachboo\",\"type\":\"flnrosfqpteehzz\"},{\"properties\":{\"id\":\"yqrimzin\",\"snapshotName\":\"swjdkirso\",\"createdAt\":\"2021-07-06T02:31:11Z\",\"provisioningState\":\"Creating\",\"complianceResults\":[]},\"id\":\"ohjtckw\",\"name\":\"dsoifiyipj\",\"type\":\"sqwpgrjb\"},{\"properties\":{\"id\":\"rcjxvsnbyxqabn\",\"snapshotName\":\"cpc\",\"createdAt\":\"2021-08-24T13:39:32Z\",\"provisioningState\":\"Canceled\",\"complianceResults\":[]},\"id\":\"ljjgpbtoqcjmkl\",\"name\":\"a\",\"type\":\"bqidtqaj\"}],\"nextLink\":\"ulpkudjkrl\"}")
                .toObject(SnapshotResourceList.class);
        Assertions.assertEquals("ulpkudjkrl", model.nextLink());
    }

    @Test
    public void testSerialize() {
        SnapshotResourceList model = new SnapshotResourceList().withNextLink("ulpkudjkrl");
        model = BinaryData.fromObject(model).toObject(SnapshotResourceList.class);
        Assertions.assertEquals("ulpkudjkrl", model.nextLink());
    }
}
