// 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.OrganizationProperties;
import com.azure.resourcemanager.newrelicobservability.models.BillingSource;
import org.junit.jupiter.api.Assertions;

public final class OrganizationPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        OrganizationProperties model =
            BinaryData
                .fromString(
                    "{\"organizationId\":\"jwzrl\",\"organizationName\":\"mcl\",\"billingSource\":\"NEWRELIC\"}")
                .toObject(OrganizationProperties.class);
        Assertions.assertEquals("jwzrl", model.organizationId());
        Assertions.assertEquals("mcl", model.organizationName());
        Assertions.assertEquals(BillingSource.NEWRELIC, model.billingSource());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        OrganizationProperties model =
            new OrganizationProperties()
                .withOrganizationId("jwzrl")
                .withOrganizationName("mcl")
                .withBillingSource(BillingSource.NEWRELIC);
        model = BinaryData.fromObject(model).toObject(OrganizationProperties.class);
        Assertions.assertEquals("jwzrl", model.organizationId());
        Assertions.assertEquals("mcl", model.organizationName());
        Assertions.assertEquals(BillingSource.NEWRELIC, model.billingSource());
    }
}
