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

package com.azure.resourcemanager.resourcehealth.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.resourcehealth.fluent.models.EventImpactedResourceInner;
import com.azure.resourcemanager.resourcehealth.models.EventImpactedResourceListResult;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class EventImpactedResourceListResultTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        EventImpactedResourceListResult model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"properties\":{\"targetResourceType\":\"jqabcypmivkwlzuv\",\"targetResourceId\":\"fwnfnb\",\"targetRegion\":\"fionl\",\"info\":[]},\"id\":\"etqgtzxdpnq\",\"name\":\"qqwx\",\"type\":\"jfeallnwsub\"}],\"nextLink\":\"njampm\"}")
                .toObject(EventImpactedResourceListResult.class);
        Assertions.assertEquals("njampm", model.nextLink());
    }

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