// 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.fluent.models.AccountResourceInner;
import org.junit.jupiter.api.Assertions;

public final class AccountResourceInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AccountResourceInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"organizationId\":\"s\",\"accountId\":\"nyejhkryhtnap\",\"accountName\":\"wlokjyem\",\"region\":\"vnipjox\"},\"id\":\"nchgej\",\"name\":\"podmailzydehojwy\",\"type\":\"huxinpmqnj\"}")
                .toObject(AccountResourceInner.class);
        Assertions.assertEquals("s", model.organizationId());
        Assertions.assertEquals("nyejhkryhtnap", model.accountId());
        Assertions.assertEquals("wlokjyem", model.accountName());
        Assertions.assertEquals("vnipjox", model.region());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AccountResourceInner model =
            new AccountResourceInner()
                .withOrganizationId("s")
                .withAccountId("nyejhkryhtnap")
                .withAccountName("wlokjyem")
                .withRegion("vnipjox");
        model = BinaryData.fromObject(model).toObject(AccountResourceInner.class);
        Assertions.assertEquals("s", model.organizationId());
        Assertions.assertEquals("nyejhkryhtnap", model.accountId());
        Assertions.assertEquals("wlokjyem", model.accountName());
        Assertions.assertEquals("vnipjox", model.region());
    }
}
