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

public final class AccountPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AccountProperties model =
            BinaryData
                .fromString(
                    "{\"organizationId\":\"wixjsprozvcp\",\"accountId\":\"eg\",\"accountName\":\"wmfdatscmdvpjhul\",\"region\":\"uvm\"}")
                .toObject(AccountProperties.class);
        Assertions.assertEquals("wixjsprozvcp", model.organizationId());
        Assertions.assertEquals("eg", model.accountId());
        Assertions.assertEquals("wmfdatscmdvpjhul", model.accountName());
        Assertions.assertEquals("uvm", model.region());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AccountProperties model =
            new AccountProperties()
                .withOrganizationId("wixjsprozvcp")
                .withAccountId("eg")
                .withAccountName("wmfdatscmdvpjhul")
                .withRegion("uvm");
        model = BinaryData.fromObject(model).toObject(AccountProperties.class);
        Assertions.assertEquals("wixjsprozvcp", model.organizationId());
        Assertions.assertEquals("eg", model.accountId());
        Assertions.assertEquals("wmfdatscmdvpjhul", model.accountName());
        Assertions.assertEquals("uvm", model.region());
    }
}
