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

package com.azure.resourcemanager.newrelicobservability.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.newrelicobservability.models.HostsGetRequest;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class HostsGetRequestTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        HostsGetRequest model =
            BinaryData
                .fromString("{\"vmIds\":[\"xyqj\",\"k\",\"attpngjcrcczsq\",\"jh\"],\"userEmail\":\"mdajv\"}")
                .toObject(HostsGetRequest.class);
        Assertions.assertEquals("xyqj", model.vmIds().get(0));
        Assertions.assertEquals("mdajv", model.userEmail());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        HostsGetRequest model =
            new HostsGetRequest().withVmIds(Arrays.asList("xyqj", "k", "attpngjcrcczsq", "jh")).withUserEmail("mdajv");
        model = BinaryData.fromObject(model).toObject(HostsGetRequest.class);
        Assertions.assertEquals("xyqj", model.vmIds().get(0));
        Assertions.assertEquals("mdajv", model.userEmail());
    }
}
