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

package com.azure.resourcemanager.elastic.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.elastic.models.CompanyInfo;
import org.junit.jupiter.api.Assertions;

public final class CompanyInfoTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        CompanyInfo model =
            BinaryData
                .fromString(
                    "{\"domain\":\"ndv\",\"business\":\"ozwyiftyhxhuro\",\"employeesNumber\":\"tyxolniwpwc\",\"state\":\"jfkgiawxk\",\"country\":\"ypl\"}")
                .toObject(CompanyInfo.class);
        Assertions.assertEquals("ndv", model.domain());
        Assertions.assertEquals("ozwyiftyhxhuro", model.business());
        Assertions.assertEquals("tyxolniwpwc", model.employeesNumber());
        Assertions.assertEquals("jfkgiawxk", model.state());
        Assertions.assertEquals("ypl", model.country());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        CompanyInfo model =
            new CompanyInfo()
                .withDomain("ndv")
                .withBusiness("ozwyiftyhxhuro")
                .withEmployeesNumber("tyxolniwpwc")
                .withState("jfkgiawxk")
                .withCountry("ypl");
        model = BinaryData.fromObject(model).toObject(CompanyInfo.class);
        Assertions.assertEquals("ndv", model.domain());
        Assertions.assertEquals("ozwyiftyhxhuro", model.business());
        Assertions.assertEquals("tyxolniwpwc", model.employeesNumber());
        Assertions.assertEquals("jfkgiawxk", model.state());
        Assertions.assertEquals("ypl", model.country());
    }
}
